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. 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, which are also part of libyourapp.
This additional layer won't cost too much CPU cycles and is also meaningfull
if you ever decide to switch database backends: just reimplemnt those
functions and you are back in business :)
Daniel