On Friday 16 September 2005 19:55, Ronen Mizrahi wrote: > Thank you for responding. > May I ask also a question about the apr_dbd interface and how it should > be used with sqlite in order to roll back a transaction. I was looking > for a way to rollback a transaction, and it looks like the interface > right now allows one to start a transaction and to commit it but it does > not allow one to roll it back. I ended up using apr_dbd_select() with an > SQL string of "ROLLBACK",
Erm, presumably you mean query rather than select? > is this how the interface intends for users to > do it? Yes. It's a simple interface, leaving you the option to use SQL or native-C-API to extend it where necessary. If your application wants rollback in cases other than an error condition, you should probably ignore apr_dbd_transaction and do it yourself. Doing it with apr_dbd_query and SQL commands should be portable across most backends:-) > Should there perhaps be function in apr_dbd for rollback? It's a thought for future versions: maybe end_transaction could have a parameter to indicate commit or rollback. But API changes that break back-compatibility will be treated with caution, and can only happen in a major version change. -- Nick Kew
