Hi Sqlite-users,
I'm busy doing a undo-redo with triggers as described here:
https://sqlite.org/undoredo.html
and wondering, if there is a function to build the string for the
insert-command automatically with all fields from that table.
In the sample its only 3 fields, but in real life, this is much more so this
could safe a lot of typing.
CREATE TEMP TRIGGER ex1_dt BEFORE DELETE ON ex1 BEGIN
INSERT INTO undolog VALUES(NULL,'INSERT INTO ex1(rowid,a,b,c)
VALUES('||old.rowid||','||quote(old.a)||','||quote(old.b)||
','||quote(old.c)||')');
Thanks,
Tom
--
/****************************************
** Flemming Software Development CC
** Thomas Flemming
** PO Box 81244
** Windhoek, Namibia
** http://www.quovadis-gps.com
** mail [email protected]
** +264 (0)81 3329923
** +49 (0)6182 8492599
***************************************/
_______________________________________________
sqlite-users mailing list
[email protected]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users