tursodatabase / libsql-client-py

Python SDK for libSQL
https://libsql.org/libsql-client-py/
MIT License
44 stars 10 forks source link

Implement read/write/deferred transaction modes #12

Open CodingDoug opened 1 year ago

CodingDoug commented 1 year ago

Similar to what's been implemented in TS by @honzasp , batch and transaction should have a mandatory first argument to indicate the mode.

See: https://github.com/libsql/libsql-client-ts/blob/main/src/api.ts

As a temporary compatibility, the signature of the batch and transaction methods should continue to work as they have without a mode, defaulting to a write transaction.