xref: /netbsd-src/external/public-domain/sqlite/man/sqlite3_overload_function.3 (revision 53b02e147d4ed531c0d2a5ca9b3e8026ba3e99b5)
1.Dd December 19, 2018
2.Dt SQLITE3_OVERLOAD_FUNCTION 3
3.Os
4.Sh NAME
5.Nm sqlite3_overload_function
6.Nd Overload A Function For A Virtual Table
7.Sh SYNOPSIS
8.Ft int
9.Fo sqlite3_overload_function
10.Fa "sqlite3*"
11.Fa "const char *zFuncName"
12.Fa "int nArg"
13.Fc
14.Sh DESCRIPTION
15Virtual tables can provide alternative implementations of functions
16using the xFindFunction method of the virtual table module.
17But global versions of those functions must exist in order to be overloaded.
18.Pp
19This API makes sure a global version of a function with a particular
20name and number of parameters exists.
21If no such function exists before this API is called, a new function
22is created.
23The implementation of the new function always causes an exception to
24be thrown.
25So the new function is not good for anything by itself.
26Its only purpose is to be a placeholder function that can be overloaded
27by a virtual table.
28.Sh SEE ALSO
29.Xr sqlite3_module 3
30