Re: [sqlite] Trigger blocks a single transaction?

2012-12-23 Thread Pavel Ivanov
Okay, sorry, I didn't understand your initial email correctly. So the answer to your question is yes, trigger is executed as a single transaction and if first statement fails then other do not execute. The only exception is when you have ON CONFLICT IGNORE. Do you observe a different behavior? Can

Re: [sqlite] Trigger blocks a single transaction?

2012-12-23 Thread Brad Hards
On Monday 24 December 2012 11:04:29 Alem Biscan wrote: > Hi, > > No, i do not execute begin/commit. It is VIEW'S INSTEAD OF UPDATE TRIGGER. > I am doing a regular update to the view from C#. Another thing is that view > doesn't return any row affected value. Well it makes sense somehow.. It > cann

Re: [sqlite] Trigger blocks a single transaction?

2012-12-23 Thread Alem Biscan
Hi, No, i do not execute begin/commit. It is VIEW'S INSTEAD OF UPDATE TRIGGER. I am doing a regular update to the view from C#. Another thing is that view doesn't return any row affected value. Well it makes sense somehow.. It cannot know how many view's visible rows were affected. It lowers the c

Re: [sqlite] Trigger blocks a single transaction?

2012-12-23 Thread Pavel Ivanov
Do you execute all updates as one call to sqlite_exec? Or as separate calls to sqlite_exec or sqlite_prepare/sqlite_step? If separate then do you check return value from the calls? And do you execute BEGIN/COMMIT somewhere? Pavel On Sun, Dec 23, 2012 at 2:37 PM, Alem Biscan wrote: > Hello, > > I

[sqlite] Trigger blocks a single transaction?

2012-12-23 Thread Alem Biscan
Hello, I am wandering if i have a block of dml statements in a trigger ( instead of ). Is it a single transaction? If something fails everything fails or? SELECT CASE WHEN NOT EXISTS ( SELECT klas_sifra FROM klasifikacija kl , tipklas tk WHERE kl . tkla_id = tk . tkla_id AND kl . klas_sifra = new