On 2/14/19, Arun - Siara Logics (cc) <a...@siara.cc> 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 d...@sqlite.org _______________________________________________ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users