Re: [sqlite] Persistent user-defined functions

2006-04-08 Thread Paul Bohme
Daniel Franke wrote: > Layering. Wrap sqlite3_* into your own set of functions. Create another > library, say libyourapp. Most functions will just forward the arguments to > sqlite, but others, e.g. yourapp_open_db() will not only open the database, > but also attach a couple of functions,

Re: [sqlite] Persistent user-defined functions

2006-04-07 Thread John Stanton
Pam Greene wrote: I use sqlite3_create_function() to attach C++ functions to SQLite triggers. For example, I create the SQL function INSERT_HANDLER(), bound to the C++ function InsertTriggerHandler(). Then I create a trigger: CREATE TRIGGER trig AFTER INSERT ON TableName FOR EACH ROW

Re: [sqlite] Persistent user-defined functions

2006-04-07 Thread Daniel Franke
On Friday 07 April 2006 22:39, Pam Greene wrote: > Is there any way to create a more broadly available, persistent custom > function, short of building it into sqlite? Or does anyone have > another suggestion to solve the implicit problem? Layering. Wrap sqlite3_* into your own set of functions.

Re: [sqlite] Persistent user-defined functions

2006-04-07 Thread Pam Greene
On 4/7/06, Jay Sprenkle <[EMAIL PROTECTED]> wrote: > On 4/7/06, Pam Greene <[EMAIL PROTECTED]> wrote: > > I use sqlite3_create_function() to attach C++ functions to SQLite > > triggers. For example, I create the SQL function INSERT_HANDLER(), > > bound to the C++ function InsertTriggerHandler().

Re: [sqlite] Persistent user-defined functions

2006-04-07 Thread Jay Sprenkle
On 4/7/06, Pam Greene <[EMAIL PROTECTED]> wrote: > I use sqlite3_create_function() to attach C++ functions to SQLite > triggers. For example, I create the SQL function INSERT_HANDLER(), > bound to the C++ function InsertTriggerHandler(). Then I create a > trigger: > > CREATE TRIGGER trig AFTER

[sqlite] Persistent user-defined functions

2006-04-07 Thread Pam Greene
I use sqlite3_create_function() to attach C++ functions to SQLite triggers. For example, I create the SQL function INSERT_HANDLER(), bound to the C++ function InsertTriggerHandler(). Then I create a trigger: CREATE TRIGGER trig AFTER INSERT ON TableName FOR EACH ROW WHEN