Re: [sqlite] how to call c/c++ function in trigger

2009-04-01 Thread Simon Chen
Thanks, Igor! You're awesome... Igor Tandetnik wrote: > > Simon Chen wrote: >> I just realized that I need to something a bit more complicated. >> Basically, I need myfunction() to take parameters. The parameters >> should be generated based on the entry inserted, like

Re: [sqlite] how to call c/c++ function in trigger

2009-04-01 Thread Igor Tandetnik
Simon Chen wrote: > Another question is, if the c/c++ function takes 10 seconds to > finish, when another process queries the exact entry being modified, > what will be returned? Either the old data, or the busy error - depending on whether your writing connection had to

Re: [sqlite] how to call c/c++ function in trigger

2009-04-01 Thread Simon Chen
Another question is, if the c/c++ function takes 10 seconds to finish, when another process queries the exact entry being modified, what will be returned? Maybe the old data? Is it possible to lock this entry so that either the new value (when check passes) or old value (when check fails) will be

Re: [sqlite] how to call c/c++ function in trigger

2009-03-31 Thread Igor Tandetnik
Simon Chen wrote: > What I want is: > > - whenever I insert/update/delete a table entry, the specified c/c++ > function is called > - if the function returns true, the db action can proceed; otherwise, > the db action should be rolled-back. create trigger triggerName

[sqlite] how to call c/c++ function in trigger

2009-03-31 Thread Simon Chen
Hi all, I have a question regarding calling c/c++ functions in sqlite triggers. What I want is: - whenever I insert/update/delete a table entry, the specified c/c++ function is called - if the function returns true, the db action can proceed; otherwise, the db action should be rolled-back. Is