3 ms·
I think this illustrates my point ... but I'm not 100% sure what you mean by "autocommit mode" in your comment! You said "autocommit feature in DB drivers" but
by quietbritishjim 5y ago
I think this illustrates my point ... but I'm not 100% sure what you mean by "autocommit mode" in your comment! You said "autocommit feature in DB drivers" but I think you mean in the DB itself by the sounds of it.
AFAIK autocommit mode just applies if you don't explicitly open a transaction, so what would you propose instead? That a transaction is silently opened but not committed (potentially leaving a dangling transaction open for a long time after SELECT statement) (like Python's odd default behaviour)? Or an immediate error?
I can certainly see that if you are indeed wrapping every individual statement in their own BEGIN/COMMIT pairs that you'd wonder why the database can't help you for such simple use cases. You can still selectively open an explicit transaction on those statements that do need to be grouped together, so I don't see that you've given up any control.