sqlite-utils
will now use sqlean.py in place ofsqlite3
if it is installed in the same virtual environment. This is useful for Python environments with either an outdated version of SQLite or with restrictions on SQLite such as disabled extension loading or restrictions resulting in thesqlite3.OperationalError: table sqlite_master may not be modified
error. (#559)- New
with db.ensure_autocommit_off()
context manager, which ensures that the database is in autocommit mode for the duration of a block of code. This is used bydb.enable_wal()
anddb.disable_wal()
to ensure they work correctly withpysqlite3
andsqlean.py
. - New
db.iterdump()
method, providing an iterator over SQL strings representing a dump of the database. This usessqlite-dump
if it is available, otherwise falling back on theconn.iterdump()
method fromsqlite3
. Bothpysqlite3
andsqlean.py
omit support foriterdump()
- this method helps paper over that difference.