Innov-AI
    Documentation | MentDB Weak Server
Generate Web-Service to UPDATE on table

  • To generate Web-Service to UPDATE on table:
  • Right click on the table 'apps' and select 'GEN WS > UPDATE'
  • script create put "MENTDB.apps.update" false 1
      (param
      	(var "[app_id]" {true} "description ..." is_null:false is_empty:false "example ...")
      	(var "[title]" {true} "description ..." is_null:false is_empty:false "example ...")
      )
      "Update an element into the table 'apps'."
    {
    	
    	try {
    		
    		#Connection ...;
    		sql connect "session1" {cm get "MENTDB"};
    		
    		-> "[result]" (sql dml "session1" (concat 
    			"UPDATE public.apps SET 
    				app_id=" (sql encode [app_id]) " ,
    				title=" (sql encode [title]) "
    			WHERE 
    			;"
    		));
    		
    		#Disconnection ...;
    		sql disconnect "session1";
    		
    		# Return the json;
    		[result]
    		
    	} {
    
    		#Close the connection;
    		try {sql disconnect "session1"} {} "[sub_err]";
    
    		#Generate an error;
    		exception (1) ([err]);
    		
    	} "[err]";
    	
    } "Return the number of impacted lines.";
  • Update the script and save:
  • Execute buttons
Services     Supporters     Contact     About     Legal notice © 2024