kaykay-dv / pocketsearch

A simple full-text search library for Python using SQLite and its FTS5 extension
https://pocketsearch.readthedocs.io/en/latest/
MIT License
1 stars 0 forks source link

Transaction handling #45

Closed kaykay-dv closed 1 year ago

kaykay-dv commented 1 year ago

Versions 0.12 and lower do not provide sufficient transaction management. The current strategy is: changes are written to the database until an error occurrs or the process is finished. Using the context manager PocketWriter it would be desirable that each instance of a PocketWriter represented a transaction that is rollbacked when an error occurs.

To be consistent, the "write_buffer_size" should be removed from all API interfaces. As a commit is executed once the write_buffer_size is full, this might lead to confusion with the paradigm of a single commit after the PocketWriter is exited.

kaykay-dv commented 1 year ago

Fixed in 0.20.0