Use sqlean if available in environment (#560)

Closes #559
Closes #235

Refs https://github.com/simonw/llm/issues/60

- Uses `sqlean` in place of `sqlite3` if `sqlean.py` is installed
- Uses `sqlite-dump` if available and `conn.iterdump()` does not exist
- New `with db.ensure_autocommit_off()` method for ensuring autocommit is off, used by `enable_wal()` and `disable_wal()`.
This commit is contained in:
Simon Willison 2023-06-25 16:25:51 -07:00 committed by GitHub
commit f5c63088e1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
12 changed files with 136 additions and 19 deletions

View file

@ -35,6 +35,9 @@ jobs:
- name: Install SpatiaLite
if: matrix.os == 'ubuntu-latest'
run: sudo apt-get install libsqlite3-mod-spatialite
- name: On macOS with Python 3.10 test with sqlean.py
if: matrix.os == 'macos-latest' && matrix.python-version == '3.10'
run: pip install sqlean.py sqlite-dump
- name: Build extension for --load-extension test
if: matrix.os == 'ubuntu-latest'
run: |-