tursodatabase / libsql-client-rs

libSQL Rust client library can be used to communicate with sqld natively over HTTP protocol with native Rust interface.
MIT License
75 stars 27 forks source link

Implement read/write/deferred transaction modes #25

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.