Innov-AI
    Documentation | MentDB Weak Server
Executer a SQL transaction

  • try {
    
    	sql connect "session1" {cm get "demo_cm_mysql";};
    
    	sql auto_commit "session1" false;
    
    	sql dml "session1" (concat "insert into products (id, name, quantity) values (4, 'name 4', '4567');");
    	sql dml "session1" (concat "insert into products (id, name, quantity) values (5, 'name 5', '4567');");
    	sql dml "session1" (concat "insert into products (id, name, quantity) values (6, 'name 6', '4567');");
    	sql dml "session1" (concat "insert into products (id, name, quantity) values (7, 'name 7', '4567');");
    
    	sql commit "session1";
    
    	sql disconnect "session1";
    
    } {
    
    	try {sql rollback "session1";} {} "[err_sql]";
    	try {sql disconnect "session1";} {} "[err_sql]";
    	
    	log trace [err_global]; 
    
    } "[err_global]";
Services     Supporters     Contact     About     Legal notice © 2024