On 6 May 2011, at 10:14pm, Nico Williams wrote: > Here's what I need: > > - at transaction time I need a way to record somewhere that the > transaction did start. This would mostly be an insert into a table > with an INTEGER PRIMARY KEY AUTOINCREMENT column, and a time of > transaction start. I can do without this by simply doing an insert > into that table if the relevant row didn't already exist.
You can do an 'INSERT OR IGNORE'. > - at transaction commit time I need to be able to RAISE() exceptions > if the concluding transaction does not meet certain requirements. > I.e., SELECT RAISE(ROLLBACK, 'Error: user did not x, y, or z') WHERE > <various sub-queries>. I have no way to detect end of transaction > time, so I can't really do without this :( > > I'd also like to be able to do inserts/updates/deletes at transaction > commit time, as if the application's COMMIT has been a savepoint, but > I could live without this capability. You may be subverting the way SQL works. The alternative kind of trigger to ROW is not TRANSACTION, it's STATEMENT. One can use several statements in a TRANSACTION. I suspect your easiest way forward would be to implement that code inside your application: instead of calling "BEGIN" and "COMMIT" make your own routines for those two things. Another way would be to take apart SQLite and rewrite some of the code in ways that suit this one particular application. Simon. _______________________________________________ sqlite-users mailing list [email protected] http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

