pyrqlite
pyrqlite copied to clipboard
If transactions are implemented in rqlite add support
The plan right now is to implement transaction support in rqlite 5.0. If this work completes, this library should be updated to take advantage of. See https://github.com/rqlite/rqlite/issues/266 for details of the proposed design.
When a cursor
is first created, and assuming the system is not in autocommit mode, a transaction should be started (hit the proposed API on the rqlite node). Store the transaction ID on the cursor
, which will prevent other cursors from writing within that transaction. The connection
can commit or rollback the transaction at anytime, by hitting the same endpoint. Whether that call should supply the transaction ID is TBD.
It would be worth studying the behavior of the mainstream SQLite DB API 2.0 driver, to learn its behaviour.
The new code may also have to deal with code like so (from the Django SQLite backend):
self.cursor().execute("BEGIN")
I'm assuming there hasn't been any progress on this issue as of yet. How can I help?
No, there hasn't been any progress yet. Transactions support -- as it's usually defined -- doesn't yet exist in rqlite.