Open penberg opened 10 months ago
Hi, can I try implementing this?
Hey @gavsidhu, absolutely, I tagged as "help wanted" so anyone interested can have a stab at it. Feel free to drop by our Discord if you need help with it.
@penberg Let me know if my pull request #102 is the implementation you wanted.
I'm wondering what does it mean to mark transaction in database/sql as read-only and if there's any benefit of doing that.
I tested this with turso db shell and it seems that read only transactions don't work for hrana:
→ select * from test;
A
→ begin readonly; insert into test values(101); select * from test; commit;
A
101
Confirmed that read only transactions work only for embedded replicas which this client does not support -> https://github.com/tursodatabase/libsql/issues/1555
Report on Discord:
We do have support for read-only transactions in libSQL so let's look into implementing this.