How do I enable transactional DDL in pysqlite?

115 views Asked by At

I am using pysqlite which, by default, does not enable transactional DDL (although DDL is transactional from the sqlite3 client).

How do I enable transactional DDL within pysqlite?

1

There are 1 answers

0
joeforker On BEST ANSWER

pysqlite always performs an implicit commit unless the lowercased query string starts with optional whitespace and one of 'select', 'insert', 'update' , 'delete', or 'replace'. There is no elegant way to turn this off. To work around this, you could edit the pysqlite C source code.