Thank you!!  It works like a charm.  Before your reply I added FUNCTION macros 
before sqlite3InsertBuiltinFuncs().  That worked too.  But I guess using 
sqlite3_auto_extension() is elegant and I will go that way.


 ---- On Thu, 14 Feb 2019 17:16:01 +0530 Richard Hipp <[email protected]> wrote 
---- 
 > On 2/14/19, Arun - Siara Logics (cc) <[email protected]> wrote:
 > >
 > > The sqlite3_create_functions require the 'db' parameter to define a user
 > > defined function according to the doc:
 > > "The first parameter is the database connection to which the SQL function 
 > > is
 > > to be added. If an application uses more than one database connection then
 > > application-defined SQL functions must be added to each database connection
 > > separately."
 > >
 > > Is it possible to define a global scalar function so that it does not need
 > > to be registered for every function?  That way, I can define such a 
 > > function
 > > and ship it with the binary and it can be used with any database using the
 > > binary.
 > 
 > Use the sqlite3_auto_extension() interface
 > (https://www.sqlite.org/c3ref/auto_extension.html) to cause your UDFs
 > to be registered automatically with all new database connections.
 > 
 > -- 
 > D. Richard Hipp
 > [email protected]
 > _______________________________________________
 > sqlite-users mailing list
 > [email protected]
 > http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
 > 


_______________________________________________
sqlite-users mailing list
[email protected]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to