Quoth Oliver Schneider , on 2010-09-09 00:12:43 +:
> > Can't you just include the modified value within your UPDATE or
> > INSERT statement? Or is the modified column in a separate table?
>
> Guess I'll do that. SQLite is just so convenient even from command line,
> that I thought it'd be bett
On 2010-09-09 00:15, Igor Tandetnik wrote:
> This updates all the rows in the table, not just the one for which the
> trigger was fired. You want something along the lines of
>
> UPDATE file SET modified=julianday('now')
> where file.rowid = new.rowid;
Ouch. Thanks for shedding some light on this
Oliver Schneider wrote:
> Hmm, strange. These are the triggers I used:
>
> CREATE TRIGGER IF NOT EXISTS file_change AFTER UPDATE OF hash,name,path
> ON file
> BEGIN
>UPDATE file SET modified=julianday('now');
> END;
This updates all the rows in the table, not just the one for which the tri
Thanks for your reply.
> Can't you just include the modified value within your UPDATE or
> INSERT statement? Or is the modified column in a separate table?
Guess I'll do that. SQLite is just so convenient even from command line,
that I thought it'd be better to automate that part to figure out if
Oliver Schneider wrote:
> I'm having a table of file names along with hashes and so on. In order
> to make sure that we keep a record, I had put a trigger on UPDATE and
> INSERT which would set the column 'modified' (REAL, Julian day) to the
> time of the change. However, this slows down any INSERT
Hi,
I'm having a table of file names along with hashes and so on. In order
to make sure that we keep a record, I had put a trigger on UPDATE and
INSERT which would set the column 'modified' (REAL, Julian day) to the
time of the change. However, this slows down any INSERTs (even those
seemingly unr
6 matches
Mail list logo