On Sun, Apr 17, 2011 at 11:44 AM, Petite Abeille <petite.abei...@gmail.com> wrote: > On Apr 17, 2011, at 6:33 PM, Nico Williams wrote: >> Now, it's true that that's expected, but if all the application >> "business" logic can be encoded in table constraints, indexes and >> triggers, then it ought to be possible to make it safe to access via >> the shell, and _that_'s what I'm looking for. > > Perhaps it would be handy to have so-called system trigger, such as on > STARTUP, SHUTDOWN, and other database event.
Yes. In fact, I've considered storing all the startup statements in a table such that I could tell advanced users how to trivially find how to setup their DBs. Of course, since there's no eval(), and that's a good thing, they'd have to cut-n-paste or direct output to a file then .read it. Also, I've found a use for transaction-level triggers (which had been proposed some years ago): they are a perfect place to enforce certain rules that are not feasible with straight up standard SQL, something like SELECT RAISE(...) WHERE <validation logic> (this in a COMMIT trigger). And with checkpointing I think you could even make it so transaction level triggers could make changes too. Nico -- _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users