tursodatabase / libsql-client-go

Go client API for libSQL
MIT License
166 stars 23 forks source link

Driver should use an appropriate type of SQLite transaction for ReadOnly transactions #43

Open CodingDoug opened 1 year ago

CodingDoug commented 1 year ago

It looks like BeginTx takes a TxOptions struct which allows the caller to specify if this is a ReadOnly transaction. This should be used to implement the correct type of SQLite transaction, similar to the way the TS SDK now accepts a read/write/deferred mode as implemented by @honzasp.

We should also make sure that Begin and BeginTx with no options is taking a good default (probably a write transaction, and not a deferred transaction as it is now).