Comprehensive async support - connections run in a dedicated worker thread with the event loop able to await the results.
-
asyncio, trio (note), and anyio (note) are supported and tested
-
Async callbacks can be used anywhere including:
- scalar, window, and aggregate functions
- virtual tables (only the methods you want)
- apsw.ext.make_virtual_module()
- VFS (again, only the methods you want)
- the various other SQLite hooks
-
Cancellations and deadlines (timeouts) from the event loop apply to executing SQL as well as async callbacks
-
Type stubs as used by type checkers and IDEs reflect async usage
Documentation:
Regularised str and repr for APSW objects:
- str and repr return the same value
- async and closed are indicated
- Subclasses name are used instead of the APSW parent class
SQLite has many extra useful extensions and programs that have to be compiled. These can be packaged with APSW for convenient access. See SQLite extra documentation. This is the default for PyPI builds. Also included is the experimental under development vec1 vector search extension.
Added Connection.reserve_bytes(). This is useful for some of the extras like the checksum VFS.
Fix wrapping, indents. and space for hyphens in apsw.unicode.text_wrap() under various conditions (APSW issue 600)
Added option to apsw.unicode.text_wrap() for justifying text. This is used in apsw.ext.format_query_table() to centre column names, and right align integers. That updates the shell output. (APSW issue 601)
Update fork_checker() and shutdown() for more robustness (APSW issue 602)
Amalgamation builds only (eg PyPI): Following the recommended compile time options, the following options are now set. Other applicable recommendations were done in earlier releases. You can use apsw.compile_options to see what is in effect.
- SQLITE_OMIT_AUTOINIT. initialize() is called when APSW is loaded. Backwards incompatible change: This will only affect apsw.config() calls made before anything else, and will now require an explicit apsw.shutdown(), apsw.config(), and apsw.initialize().
- SQLITE_STRICT_SUBTYPE - subtypes are not exposed in APSW, but are used by SQLite builtin functions.
- SQLITE_LIKE_DOESNT_MATCH_BLOBS which is a backwards incompatible change if you deliberately use LIKE against blobs, which is not a good idea.
Take advantage of SQLITE_UTF8_ZT encoding and sqlite3_carray_bind_v2 in the C code.
A TableChange for SQLITE_CHANGESET_FOREIGN_KEY returns None for all fields except fk_conflicts