More evil SQLite
Published on
Here's some more evil use of SQLite.
CREATE TRIGGER sqlar_update INSTEAD OF UPDATE ON sqlar BEGIN -- ... END;
(Explanation: sqlar
is the name of the table used for a SQLite Archive. Here I've implemented it as a view, rather than a table, and written INSTEAD OF
triggers to translate UPDATE
s, and INSERT
s and DELETE
s too, to the radically differently-arranged tables that the view pulls from. So my rather complex format should also as a side feature be accessible by the SQLite shell as an archive (or by the standalone sqlar
program).)
Tagged:
- Personal
- Databases
- SQLite
- Evil