You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "lidavidm (via GitHub)" <gi...@apache.org> on 2023/04/21 23:22:01 UTC

[GitHub] [arrow-adbc] lidavidm commented on issue #599: SQLite PRAGMA journal_mode modifications fail within transactions

lidavidm commented on issue #599:
URL: https://github.com/apache/arrow-adbc/issues/599#issuecomment-1518418557

   Ah.
   
   So DBAPI in Python requires that implementations _not_ use autocommit mode. But SQLite autocommits by default, so the Python ADBC bindings explicitly disable this. The SQLite driver handles this by starting a transaction...
   
   It sounds like the stdlib module does something similar, but only for certain kinds of statements. That sounds a little more brittle than I'd like: https://docs.python.org/3/library/sqlite3.html#sqlite3-controlling-transactions
   
   Would a nonstandard method like [`executescript`](https://docs.python.org/3/library/sqlite3.html#sqlite3.Cursor.executescript) be an option? Either that, or a way to disable this transaction handling with [`isolation_level`](https://docs.python.org/3/library/sqlite3.html#sqlite3.Cursor.executescript) instead of an explicit `COMMIT` (which may confuse the driver's own handling of COMMIT/BEGIN)


-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org