Kodok Márton wrote:
>   Hello,
>   I am working on a syncing project and I do have a lot of triggers to 
> read/write foreign keys.
>   And while I do the sync of one table the triggers are causing a strange 
> effect (as the other table is not yet synced).
>   Is there a pragma to disable triggers on the sqlite database?
>   Regards,
>   Marton

I think a better solution here would be some kind of syntax that lets you 
perform multiple data-manipulation operations "simultaneously"; for example:

   INSERT INTO DEBITS (...) VALUES (...),
   INSERT INTO CREDITS (...) VALUES (...);

In this example, the 2 statements are separated by a comma rather than a 
semicolon (you can use different syntax instead if you want), so they are 
treated as a single statement in that their updates all happen as a single 
update.

In this case, the triggers don't have to be disabled; they would just run 
after the combined statement completes.

Note that my proposal is not the same as transactions, since you can have 
triggers run between statements in a transaction and said statements are 
not collectively atomic in the same way where no database state exists 
between statements.

-- Darren Duncan
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to