godot-sqlite icon indicating copy to clipboard operation
godot-sqlite copied to clipboard

Consider making the transaction on insert_rows, update_rows and delete_rows optional

Open upta opened this issue 8 months ago • 1 comments

Is your feature request related to a problem? Please describe. If you want to provide your own transaction (say, if you updating multiple tables), having the default transaction prevents it.

Describe the solution you'd like Add a "useTransaction" parameter for each of the methods that defaults to true to retain existing behavior.

Describe alternatives you've considered Writing the queries manually, but then we lose out on the cleaner interface these methods provide.

Additional context That's about it!

upta avatar Apr 25 '25 21:04 upta

I ran into the same issue today since I need to run my own transaction:

ERROR: src/gdsqlite.cpp:351 - --> SQL error: cannot start a transaction within a transaction

Another method that can benefit for this extra config param is create_table.

See https://github.com/2shady4u/godot-sqlite/issues/220

diosney avatar Sep 14 '25 23:09 diosney