ImmortalLotus opened a new issue, #3559:
URL: https://github.com/apache/arrow-adbc/issues/3559

   ### What feature or improvement would you like to see?
   
   Currently, executescript is the best way to run complex DDL that 
adbc_driver_manager offers, but it suffers from having an issue: 
   
   you cannot do the following snippet(pseudocode) correctly in 
adbc_driver_manager, because executescript commits by default, and thus nothing 
is rolled back in case only the last one fails
   
   
   ```Python
   ddl_list=["first.sql","second.sql","lastone.sql"]
   conn=adbcdrivermanagerpostgres conn
   with conn.cursor() as cur:
        cur.execute("BEGIN;")
        try:
            for ddl in ddl_list:
               cur.executescript(ddl)
        except Exception: 
             cursor.execute("ROLLBACK;")
        else:
            cursor.execute("COMMIT;")
   ```
   
   Expected behavior is that executescript does not commit by default at all, 
or has a flag to disable such behavior
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to