-
Notifications
You must be signed in to change notification settings - Fork 75
sql driver Exec should creates its own transaction #106
Comments
On a two week vacations currently. Will take a look after that. |
I encountered a similar issue while using gorp's |
ping @cznic There is no interest in this feature. The way I see it the current implementation ensures integrity without adding overhead. It is the duty of the user to wrap all operations which will change the state of the database in a transaction. We can close this, and if there is another use case for this feature this issue can always be reopened. |
Shame on me, I forgot about this completely. However, as @gernest pointed out, R/W transactions are not free, quite the opposite. If someone wants to come with an implementation turning this feature on optionally, it would be accepted. (Suggestion, introduce |
@cznic can you expand a bit on what you think about |
I thougth that there's a PRAGMA statement for that but I cannot find anything so it probably isn't. Relevant |
The only information useful on the sqllite you provided is that auto commit is on by default, which I think is irrelevant to this issue. Doing this at BTW: Have you done benchmarks on ql? To see how it compares to other embedded databases e.g sqlite? |
No.
There's a lot of benchmarks (-bench .).
Probably badly. I've never finished the new backend and the current one has never been optimized. Also, from today's POV, there's a lot of bad design choices made making things slower than necessary. |
Is there a chance to improve? or fix the mistakes? |
Sure, rewrite from scratch ;-) But seriously, profiling and gradually improving the problematic parts will work as well. It's hard to tell which way is more work, but both are probably a lot/too much of work. |
😄 I see. I think ql is useful for testing. After I have added support to the orm I've been hacking on. I run all tests on my projects with ql, with prospects of later on to switch to postgres/mysql/sqlite in production by just switching the driver. |
when trying to exec Exec on the database connection as such
I get this error:
attempt to update the DB outside of a transaction
This should create its own transaction
The text was updated successfully, but these errors were encountered: