Home | History | Annotate | Download | only in dist

Lines Matching defs:FUNCTION

180 ** The maximum number of arguments to an SQL function.
560 ** presents to client programs. If a C-function, structure, datatype,
680 ** macro. ^The sqlite3_libversion() function returns a pointer to the
682 ** function is provided for use in DLLs since DLL users usually do not have
684 ** sqlite3_libversion_number() function returns an integer equal to
685 ** [SQLITE_VERSION_NUMBER]. ^The sqlite3_sourceid() function returns
699 ** ^The sqlite3_compileoption_used() function returns 0 or 1
704 ** ^The sqlite3_compileoption_get() function allows iterating
726 ** ^The sqlite3_threadsafe() function returns zero if and only if
752 ** sqlite3_threadsafe() function shows only the compile-time setting of
840 ** The type for a callback function.
857 ** argument. ^If the callback function of the 3rd argument to
881 ** ^The 2nd argument to the sqlite3_exec() callback function is the
910 int (*callback)(void*,int,char**,char**), /* Callback function */
1417 ** The xRandomness() function attempts to return nBytes bytes
1429 ** greater and the function pointer is not NULL) and will fall back
1732 void *(*xMalloc)(int); /* Memory allocation function */
1929 ** function with a call signature of void(*)(void*,int,const char*),
1930 ** and a pointer to void. ^If the function pointer is not NULL, it is
1932 ** function pointer is NULL, the [sqlite3_log()] interface becomes a no-op.
1935 ** function whenever that function is invoked. ^The second parameter to
1936 ** the logger function is a copy of the first parameter to the corresponding
1940 ** The SQLite logging interface is not reentrant; the logger function
1943 ** function must be threadsafe. </dd>
2047 ** This function is accessible to SQL statements via the
2048 ** [last_insert_rowid() SQL function].
2052 ** function is running and thus changes the last insert [rowid],
2062 ** ^This function returns the number of database rows that were changed
2068 ** [sqlite3_total_changes()] function to find the total number of changes
2091 ** ^This function returns the number of direct row changes in the
2095 ** ^Thus, when called from the top level, this function returns the
2105 ** [count_changes pragma], and the [changes() SQL function].
2116 ** ^This function returns the number of row changes caused by [INSERT],
2126 ** ^The sqlite3_total_changes() function counts the changes as soon as
2131 ** [count_changes pragma], and the [total_changes() SQL function].
2142 ** ^This function causes any pending database operation to abort and
2217 ** ^This routine sets a callback function that might be invoked whenever
2352 ** ^The sqlite3_get_table() function evaluates one or more
2361 ** function must not try to call [sqlite3_free()] directly. Only
2687 ** The [sqlite3_set_authorizer | authorizer callback function] must
2699 ** The [sqlite3_set_authorizer()] interface registers a callback function
2707 ** callback function will be parameters or NULL depending on which of these
2746 #define SQLITE_FUNCTION 31 /* NULL Function Name */
2756 ** ^The callback function registered by sqlite3_trace() is invoked at
2764 ** ^The callback function registered by sqlite3_profile() is invoked
2772 ** sqlite3_profile() function is considered experimental and is
2783 ** function X to be invoked periodically during long running calls to
2789 ** callback function X. ^The parameter N is the number of
2965 ** function.
3054 ** <dd>The maximum number of arguments on a function.</dd>)^
3254 ** CAPI3REF: SQL Function Context Object
3256 ** The context in which an SQL function executes is stored in an
3259 ** The application-defined SQL function implementation will pass this
3488 ** the statement, where N is the second function argument.
3556 ** interfaces [sqlite3_prepare()] or [sqlite3_prepare16()], this function
3848 ** ^The sqlite3_finalize() function is called to delete a [prepared statement].
3875 ** The sqlite3_reset() function is called to reset a [prepared statement]
3900 ** KEYWORDS: {function creation routines}
3901 ** KEYWORDS: {application-defined SQL function}
3904 ** ^These functions (collectively known as "function creation routines")
3908 ** the the second parameter (the name of the function being created)
3913 ** function is to be added. ^If an application uses more than one database
3917 ** ^The second parameter is the name of the SQL function to be created or
3921 ** ^Any attempt to create a function with a longer name
3925 ** is the number of arguments that the SQL function or
3926 ** aggregate takes. ^If this parameter is -1, then the SQL function or
3933 ** [SQLITE_UTF8 | text encoding] this SQL function prefers for
3934 ** its parameters. Every SQL function implementation must be able to work
3938 ** times with the same function but with different values of eTextRep.
3939 ** ^When multiple implementations of the same function are available, SQLite
3945 ** function can gain access to this pointer using [sqlite3_user_data()].)^
3948 ** pointers to C-language functions that implement the SQL function or
3949 ** aggregate. ^A scalar SQL function requires an implementation of the xFunc
3951 ** parameters. ^An aggregate SQL function requires an implementation of xStep
3953 ** SQL function or aggregate, pass NULL poiners for all three function
3958 ** The destructor is invoked when the function is deleted, either by being
3970 ** SQL function is used. ^A function implementation with a non-negative
3971 ** nArg parameter is a better match than a function implementation with
3972 ** a negative nArg. ^A function where the preferred text encoding
3974 ** match than a function where the encoding is different.
3975 ** ^A function where the encoding difference is between UTF16le and UTF16be
3976 ** is a closer match than a function where the encoding difference is
3981 ** ^An application-defined function is permitted to call other
3984 ** statement in which the function is running.
4051 ** CAPI3REF: Obtaining SQL Function Parameter Values
4055 ** the function or aggregate.
4062 ** each parameter to the SQL function. These routines are used to
4093 ** the SQL function that supplied the [sqlite3_value*] parameters.
4109 ** CAPI3REF: Obtain Aggregate Function Context
4115 ** for a particular aggregate function, SQLite
4118 ** sqlite3_aggregate_context() for the same aggregate function instance,
4122 ** an aggregate query, the xStep() callback of the aggregate function
4133 ** the same aggregate function instance will not resize the memory
4140 ** [sqlite3_context | SQL function context] that is the first parameter
4142 ** function.
4145 ** the aggregate SQL function is running.
4156 ** registered the application defined function.
4159 ** the application-defined function is running.
4170 ** registered the application defined function.
4175 ** CAPI3REF: Function Auxiliary Data
4179 ** multiple invocations of the same SQL function during query execution, under
4182 ** function. The compiled version of the regular expression is stored as
4185 ** invocations of the same function so that the original pattern string
4189 ** associated by the sqlite3_set_auxdata() function with the Nth argument
4190 ** value to the application-defined function. ^If no metadata has been ever
4191 ** been set for the Nth argument of the function, or if the corresponding
4192 ** function parameter has changed since the meta-data was set,
4197 ** argument of the application-defined function. Subsequent
4201 ** function given by the 4th parameter to sqlite3_set_auxdata() on
4202 ** the metadata when the corresponding function parameter changes
4206 ** parameter of any function at any time. ^The only guarantee is that
4209 ** ^(In practice, metadata is preserved between function calls for
4214 ** the SQL function is running.
4239 ** CAPI3REF: Setting The Result Of An SQL Function
4251 ** an application-defined function to be the BLOB whose content is pointed
4256 ** the application-defined function to be a BLOB containing all zero
4260 ** an application-defined function to be a floating point value specified
4264 ** cause the implemented SQL function to throw an exception.
4278 ** they return. Hence, the calling function can deallocate or
4280 ** ^The sqlite3_result_error_code() function changes the error code
4281 ** returned by SQLite as a result of an error in a function. ^By default,
4292 ** of the application-defined function to be the 32-bit signed integer
4295 ** of the application-defined function to be the 64-bit signed integer
4299 ** of the application-defined function to be NULL.
4303 ** set the return value of the application-defined function to be
4314 ** function result.
4317 ** function as the destructor on the text or BLOB result when it has
4330 ** the application-defined function to be a copy the
4340 ** than the one containing the application-defined function that received
4381 ** to the collating function callback, xCallback.
4388 ** through as the first argument to the collating function callback.
4390 ** ^The fifth argument, xCallback, is a pointer to the collating function.
4393 ** function requires the least amount of data transformation.
4394 ** ^If the xCallback argument is NULL then the collating function is
4398 ** ^The collating function callback is invoked with a copy of the pArg
4400 ** by the eTextRep argument. The collating function must return an
4403 ** respectively. A collating function must alway return the same answer
4407 ** The collating function must obey the following properties for all
4417 ** If a collating function fails any of the above constraints and that
4418 ** collating function is registered and used, then the behavior of SQLite
4423 ** the collating function is deleted.
4429 ** sqlite3_create_collation_v2() function fails. Applications that invoke
4466 ** can be used, a single callback function may be registered with the
4470 ** ^If the function is registered using the sqlite3_collation_needed() API,
4474 ** ^A call to either function replaces the existing collation-needed callback.
4481 ** sequence function required. The fourth parameter is the name of the
4484 ** The callback function should register the desired collation using
4547 ** The sqlite3_sleep() function causes the current thread to suspend execution
4609 ** an error is to use this function.
4648 ** function to be invoked whenever a transaction is [COMMIT | committed].
4652 ** function to be invoked whenever a transaction is [ROLLBACK | rolled back].
4656 ** ^If the callback on a commit hook function returns non-zero,
4660 ** return the P argument from the previous call of the same function
4662 ** the first call for each function on D.
4672 ** ^Registering a NULL function disables the callback.
4694 ** ^The sqlite3_update_hook() interface registers a callback function
4697 ** ^Any callback set by a previous call to this function
4700 ** ^The second argument is a pointer to the function to invoke when a
4729 ** ^The sqlite3_update_hook(D,C,P) function
4854 ** passed as the first function argument.
4857 ** this function. ^The second parameter is either the name of the database
4863 ** ^The third and fourth parameters to this function are the table and column
4868 ** and subsequent parameters to this function. ^Any of these arguments may be
4885 ** call to any SQLite API function.
4903 ** ^(This function may load one or more schemas from database files. If an
4939 ** obtained from [sqlite3_malloc()]. The calling function
4946 ** See also the [load_extension() SQL function].
4973 ** ^This interface causes the xEntryPoint() function to be invoked for
4978 ** ^(Even though the function
5190 ** invoke the destructor function (if it is not NULL) when SQLite
5208 void(*xDestroy)(void*) /* Module destructor function */
5269 ** CAPI3REF: Overload A Function For A Virtual Table
5276 ** ^(This API makes sure a global version of a function with a particular
5277 ** name and number of parameters exists. If no such function exists
5278 ** before this API is called, a new function is created.)^ ^The implementation
5279 ** of the new function always causes an exception to be thrown. So
5280 ** the new function is not good for anything by itself. Its only
5281 ** purpose is to be a placeholder function that can be overloaded
5336 ** ^This function sets the [database connection] error code and message
5359 ** and the built-in [zeroblob] SQL function can be used, if desired,
5379 ** ^This function is used to move an existing blob handle so that it points
5396 ** ^This function sets the database handle error code and message.
5442 ** ^(This function is used to read data from an open [BLOB handle] into a
5470 ** ^This function is used to write data into an open [BLOB handle] from a
5476 ** this function returns [SQLITE_READONLY].
5478 ** ^This function may only modify the contents of the BLOB; it is
5568 ** [SQLITE_CONFIG_MUTEX] option of the sqlite3_config() function
5570 ** function that calls sqlite3_initialize().)^
5675 ** part of system initialization by the sqlite3_initialize() function.
5680 ** part of system shutdown by the sqlite3_shutdown() function. The
5849 ** Unlike most of the SQLite API, this function is not guaranteed to
6367 ** ^Function sqlite3_backup_step(B,N) will copy up to N pages between
6371 ** are still more pages to be copied, then the function resturns [SQLITE_OK].
6390 ** the [sqlite3_busy_handler | busy-handler function]
6560 ** However, the signature of the callback function allows SQLite to pass
6568 ** same callback function, then instead of invoking the callback function
6617 void (*xNotify)(void **apArg, int nArg), /* Callback function to invoke */
6658 ** ^The [sqlite3_wal_hook()] function is used to register a callback that
6667 ** ^The first parameter passed to the callback function when it is invoked
6675 ** The callback function should normally return [SQLITE_OK]. ^If an error
6707 ** ^The callback registered by this function replaces any existing callback
6710 ** configured by this function.
6795 double *aParam; /* Parameters passed to SQL geom function */
7345 ** make it clear to human readers when a function parameter is deliberately
7346 ** left unused within the body of a function. This usually happens when
7347 ** a function is called via a function pointer. For example the
7352 ** When a function parameter is not used at all within the body of a function,
7568 struct KeyInfo*, /* First argument to compare function */
7761 ** A smaller version of VdbeOp used for the VdbeAddOpList() function because
7797 ** function should *not* try to free the KeyInfo.
8143 ** roll back. See comments for function writeMasterJournal() in pager.c
8670 ** Wrapper around OS specific sqlite3_os_init() function.
8896 ** A hash table for function definitions.
8928 ** internal function sqlite3Error() is used to set these variables
8965 void (*xTrace)(void*,const char*); /* Trace function */
8966 void *pTraceArg; /* Argument to the trace function */
8967 void (*xProfile)(void*,const char*,u64); /* Profiling function */
8968 void *pProfileArg; /* Argument to profile function */
8992 /* Access authorization function */
8993 void *pAuthArg; /* 1st argument to the access auth function */
9099 ** Each SQL function is defined by an instance of the following
9109 FuncDef *pNext; /* Next function with same name */
9110 void (*xFunc)(sqlite3_context*,int,sqlite3_value**); /* Regular function */
9113 char *zName; /* SQL name of the function. */
9115 FuncDestructor *pDestructor; /* Reference counted destructor function */
9119 ** This structure encapsulates a user-function destructor callback (as
9121 ** create_function_v2() is called to create a function with a destructor,
9142 #define SQLITE_FUNC_CASE 0x02 /* Case-sensitive LIKE-type function */
9147 #define SQLITE_FUNC_COALESCE 0x40 /* Built-in coalesce() or ifnull() function */
9150 ** The following three macros, FUNCTION(), LIKEFUNC() and AGGREGATE() are
9153 ** FUNCTION(zName, nArg, iArg, bNC, xFunc)
9154 ** Used to create a scalar function definition of a function zName
9155 ** implemented by C function xFunc that accepts nArg arguments. The
9157 ** as the user-data (sqlite3_user_data()) for the function. If
9161 ** Used to create an aggregate function definition implemented by
9164 ** FUNCTION().
9167 ** Used to create a scalar function definition of a function zName
9169 ** function likeFunc. Argument pArg is cast to a (void *) and made
9170 ** available as the function user-data (sqlite3_user_data()). The
9174 #define FUNCTION(zName, nArg, iArg, bNC, xFunc) \
9216 void (*xDestroy)(void *); /* Module destructor function */
9242 ** There may two separate implementations of the collation function, one
9250 ** as the first argument to the UTF-8 comparison function, xCmp.
9251 ** CollSeq.pUser16 is the equivalent for the UTF-16 comparison function,
9351 ** Refer to comments above function sqlite3VtabUnlockList() for an
9676 struct AggInfo_func { /* For each aggregate function */
9677 Expr *pExpr; /* Expression encoding the function */
9678 FuncDef *pFunc; /* The aggregate function implementation */
9715 ** variable name. Finally, if the expression is an SQL function (TK_FUNCTION),
9716 ** then Expr.token contains the name of the function.
9721 ** Expr.x.pList is a list of arguments if the expression is an SQL function,
9782 ExprList *pList; /* Function arguments or in "<expr> IN (<expr-list)" */
9815 #define EP_Distinct 0x0010 /* Aggregate function with DISTINCT keyword */
9818 #define EP_InfixFunc 0x0080 /* True for an infix function: LIKE, GLOB, etc */
9865 ** Flags passed to the sqlite3ExprDup() function. See the header comment
9875 ** also be used as the argument to a function, in which case the a.zName
10284 ** compiled. Function sqlite3TableLock() is used to add entries to the
10332 int nMaxArg; /* Max args passed to user function by sub-program */
10568 void (*xLog)(void*,int,const char*); /* Function for logging */
10667 ** Internal function prototypes
11423 ** Standard function tolower() is implemented using the sqlite3UpperToLower[]
12137 void (*xDel)(void *); /* If not null, call this function to delete Mem.z */
12175 #define MEM_Agg 0x2000 /* Mem.z points to an agg function context */
12199 ** of the function. This is used to implement the sqlite3_get_auxdata()
12201 ** that can be associated with a constant argument to a function. This
12207 FuncDef *pFunc; /* The definition of the function */
12212 } apAux[1]; /* One slot for each function argument */
12216 ** The "context" argument for a installable function. A pointer to an
12229 FuncDef *pFunc; /* Pointer to function information. MUST BE FIRST */
12233 int isError; /* Error code returned by the function. */
12262 ** method function.
12273 Mem **apArg; /* Arguments to currently executing user function */
12329 ** Function prototypes
12627 ** There is only one exported symbol in this file - the function
12663 ** On recent Windows platforms, the localtime_s() function is available
12707 ** The function returns the number of successful conversions.
13312 ** Process time function arguments. argv[0] is a date-time stamp.
13584 ** This function returns the same value as time('now').
13598 function returns the same value as date('now').
13612 ** This function returns the same value as datetime('now').
13632 ** This function uses the C-library functions time(), gmtime()
13634 ** as the user-data for the function.
13674 ** This function registered all of the above C functions as SQL
13681 FUNCTION(julianday, -1, 0, 0, juliandayFunc ),
13682 FUNCTION(date, -1, 0, 0, dateFunc ),
13683 FUNCTION(time, -1, 0, 0, timeFunc ),
13684 FUNCTION(datetime, -1, 0, 0, datetimeFunc ),
13685 FUNCTION(strftime, -1, 0, 0, strftimeFunc ),
13686 FUNCTION(current_time, 0, 0, 0, ctimeFunc ),
13687 FUNCTION(current_timestamp, 0, 0, 0, ctimestampFunc),
13688 FUNCTION(current_date, 0, 0, 0, cdateFunc ),
13729 ** function returning SQLITE_IOERR_NOMEM using the DO_OS_MALLOC_TEST macro.
13892 ** (if iVersion is 2 or greater and the function pointer is not NULL) and
13935 ** This function is a wrapper around the OS specific implementation of
14061 ** hash table will continue to function normally. So a malloc failure
14168 ** Populate the low-level memory allocation function pointers in
14320 ** Populate the low-level memory allocation function pointers in
14699 ** Populate the low-level memory allocation function pointers in
15219 ** This function assumes that the necessary mutexes, if any, are
15301 ** This function assumes that the necessary mutexes, if any, are
15534 ** Populate the low-level memory allocation function pointers in
16271 ** this function is a no-op.
18207 ** This function must be called before exiting any API function (i.e.
18212 ** function. However, if a malloc() failure has occurred since the previous
18258 ** * xprintf -- Calls a function to dispose of output.
18263 ** * A v- version (ex: vsnprintf) of every function is also
18389 ** output: *val = 1.4159 function return = '3'
18438 ** func This is a pointer to a function taking three arguments
18455 ** the function "func". Returns -1 on a error.
18972 } /* End of function */
19289 ** good source of random numbers. The lrand48() library function may
19744 ** changed by this function.
19801 /* This test function is not currently used by the automated test-suite.
19834 ** be freed by the calling function.
19907 ** This routine is called from the TCL test function "translate_selftest".
19997 ** Use the math library isnan() function if compiled with SQLITE_HAVE_ISNAN.
20004 ** Systems that support the isnan() library function should probably
20006 ** found that many systems do not have a working isnan() function so
20102 ** This function should be used to report any error that occurs whilst
20104 ** last thing the sqlite3_prepare() function does is copy the error
20105 ** stored by this function into the database handle using sqlite3Error().
20106 ** Function sqlite3Error() should be used during statement execution
20572 ** the MACRO version as this function assumes the single-byte case has
20775 ** this function assumes the single-byte case has already been handled.
20984 ** dereferenced for any reason. The calling function should invoke
21075 ** The hashing function.
21157 /* This function (for internal use only) locates an element in an
21252 ** If the "data" parameter to this function is NULL, then the
21325 /* 18 */ "Function",
21642 ** stub function. You will lose timing support for many
22207 ** SQLite code assumes this function cannot fail. It also assumes that
22231 ** Helper function to initialize the conversion objects from and to UTF-8.
22241 ** Helper function to free the conversion objects from and to UTF-8.
22253 ** Helper function to convert UTF-8 filenames to local OS/2 codepage.
22279 ** Helper function to convert filenames from local codepage to UTF-8.
22284 ** This function is non-static to be able to use this in shell.c and
22431 /* If the second argument to this function is NULL, generate a
23172 ** stub function. You will lose timing support for many
23295 ** Function unixMutexHeld() is used to assert() that the global mutex
23296 ** is held when required. This function
23318 ** Helper function for printing out trace information from debugging
23751 ** This function - unixLogError_x(), is only ever called via the macro
23754 ** It is invoked after an error occurs in an OS function and errno has been
23761 ** The two subsequent arguments should be the name of the OS function that
23768 const char *zFunc, /* Name of OS function that failed */
23775 ** the strerror() function to obtain the human-readable error message
23851 ** The mutex entered using the unixEnterMutex() function must be held
23852 ** when this function is called.
23883 ** The mutex entered using the unixEnterMutex() function must be held
23884 ** when this function is called.
24474 ** This function performs the parts of the "close file" operation
26144 ** This function is called to handle the SQLITE_FCNTL_SIZE_HINT
26240 ** SQLite code assumes this function cannot fail. It also assumes that
26413 ** This is not a VFS shared-memory method; it is a utility function called
26575 ** This function is called to obtain a pointer to region iRegion of the
26586 ** been allocated, it is allocated by this function.
26870 ** of "finder" functions. A finder-function is used to locate the appropriate
26873 ** the correct finder-function for that VFS.
26876 ** object. The only interesting finder-function is autolockIoFinder, which
26882 ** (1) The real finder-function named "FImpt()".
26884 ** (2) A constant pointer to this function named just "F".
26889 ** directly at the finder-function since C90 rules prevent a void*
26890 ** from be cast into a function pointer.
26898 ** * An I/O method finder function called FINDER that returns a pointer
26934 posixIoFinder, /* Finder function name */
26943 nolockIoFinder, /* Finder function name */
26952 dotlockIoFinder, /* Finder function name */
26963 flockIoFinder, /* Finder function name */
26975 semIoFinder, /* Finder function name */
26987 afpIoFinder, /* Finder function name */
27003 ** to go ahead and define the sqlite3_io_methods and finder function
27012 proxyIoFinder, /* Finder function name */
27025 nfsIoFinder, /* Finder function name */
27037 ** This "finder" function attempts to determine the best locking strategy
27103 ** This "finder" function attempts to determine the best locking strategy
27140 ** An abstract type for a pointer to a IO method finder function:
27407 ** function failing.
27446 ** argument to this function.
27451 ** Refer to comments in the unixClose() function and the lengthy comment
27501 ** This function is called by unixOpen() to determine the unix permissions
27513 ** this function queries the file-system for the permissions on the
27595 int rc = SQLITE_OK; /* Function Return Code */
27606 /* If creating a master or main-file journal, this function will open
27616 /* If argument zPath is a NULL pointer, this function is required to open
27672 /* Determine the value of the flags parameter passed to POSIX function
27919 ** function failing. This function could fail if, for example, the
27954 ** SQLite calls this function immediately after a call to unixDlSym() or
27973 ** cast into a pointer to a function. And yet the library dlsym() routine
27974 ** returns a void* which is really a pointer to a function. So how do we
27977 ** Variable x below is defined to be a pointer to a function taking
27978 ** parameters void* and const char* and returning a pointer to a function.
27979 ** We initialize x by assigning it a pointer to the dlsym() function.
27980 ** (That assignment requires a cast.) Then we call the function that
27984 ** you really cannot cast a function pointer into void*. But then, on the
29341 ** to the "finder" function. (pAppData is a pointer to a pointer because
29342 ** silly C90 rules prohibit a void* from being cast to a function pointer
29347 ** finder-function. The finder-function returns a pointer to the
29621 ** stub function. You will lose timing support for many
29943 ** WindowsCE does not have a localtime() function. So create a
30422 int rc = SQLITE_OK; /* Return code for this function */
30831 ** SQLite code assumes this function cannot fail. It also assumes that
30864 ** Function winShmMutexHeld() is used to assert() that the global mutex
30865 ** is held when required. This function is only used as part of assert()
31021 ** This is not a VFS shared-memory method; it is a utility function called
31342 ** This function is called to obtain a pointer to region iRegion of the
31353 ** been allocated, it is allocated by this function.
31518 ** function.
31549 ** function failing.
31692 /* If argument zPath is a NULL pointer, this function is required to open
31697 int rc = SQLITE_OK; /* Function Return Code */
31749 /* If the second argument to this function is NULL, generate a
32050 ** function failing. This function could fail if, for example, the
32341 ** The idea is that this function works like a combination of
32344 ** function, SQLite calls this function with zBuf pointing to
32482 /* Hashing function for the aHash representation.
32484 ** (an arbitrary prime)in the hash function provided
32580 ** The calling function must ensure that p is a valid Bitvec object
32955 ** being used for an in-memory database, this function is a no-op.
33018 ** are no outstanding page references when this function is called.
33150 ** page. This function deletes that reference, so after it returns the
33236 ** function is 0, then the data area associated with page 1 is zeroed, but
33550 ** This function is called during initialization if a static buffer is
33575 ** Malloc function used within this file to allocate space from the buffer
33577 ** such buffer exists or there is no space left in it, this function falls
33689 ** Malloc function used by SQLite to obtain space from the buffer configured
33691 ** exists, this function falls back to sqlite3Malloc().
33740 ** This function is used to resize the hash table used by the cache passed
33743 ** The global mutex must be held when this function is called.
33783 ** This function is used internally to remove the page pPage from the
33785 ** LRU list, then this function is a no-op.
33787 ** The global mutex must be held when this function is called.
33815 ** The global mutex must be held when this function is called.
33848 ** The global mutex must be held when this function is called.
33958 ** Whether or not a new page may be allocated by this function depends on
33965 ** the calling function (pcache.c) will never have a createFlag of 1 on
34099 /* It is an error to call this function if the page is already
34111 ** reuseUnlikely flag passed to this function is true, the page is added
34200 ** This function is called during initialization (sqlite3_initialize()) to
34223 ** This function is called to free superfluous dynamically allocated memory
34228 ** been released, the function returns. The return value is the total number
34250 ** This function is used by test procedures to inspect the internal state
34733 ** the implementation of each function in log.c for further details.
34968 ** List of state transitions and the C [function] that performs each:
35123 ** function sqlite3PagerRollback().
35126 ** following a commit in function sqlite3PagerCommitPhaseTwo().
35129 ** database file in function pagerStress() in order to free up
35212 function
35482 int (*xBusyHandler)(void*); /* Function to call when busy */
35611 ** This function runs many asserts to try to find inconsistencies in
35860 ** Except, if Pager.eLock is set to UNKNOWN_LOCK when this function is
35886 ** Except, if Pager.eLock is set to UNKNOWN_LOCK when this function is
35906 ** This function determines whether or not the atomic-write optimization
35915 ** an error to call this function if pPager is opened on an in-memory
35948 ** on the cache using a hash function. This is used for testing
35991 ** This function attempts to read a master journal file name from the
36080 ** The journal file must be open when this function is called.
36082 ** This function is a no-op if the journal file has not been written to
36254 ** pPager->journalOff. See comments above function writeJournalHdr() for
36520 ** This function is a no-op if the pager is in exclusive mode and not
36529 ** If the pager is in ERROR state when this function is called, the
36610 ** This function is called whenever an IOERR or FULL error that requires
36613 ** the error-code about to be returned by a pager API function. The
36614 ** value returned is a copy of the second argument to this function.
36701 ** or at least a RESERVED lock. This function may be called when there
36710 ** read-transaction, this function is called with eState==PAGER_READER
36904 ** allocated by this function. If this is the case and an allocation fails,
37136 ** available for use within this function.
37149 ** This function reads the contents of the master-journal file into
37158 ** above, this function returns without doing anything. Otherwise, if
37162 ** If an IO error within this function, an error code is returned. This
37163 ** function allocates memory by calling sqlite3Malloc(). If an allocation
37167 ** TODO: This function allocates a single block of memory to load
37263 ** This function is used to change the actual size of the database
37268 ** DBMOD or OPEN state, this function is a no-op. Otherwise, the size
37592 ** file before this function is called.
37661 ** This function is invoked once for each page that has already been
37704 ** This function is called to rollback a transaction on a WAL database.
37753 ** This function is a wrapper around sqlite3WalFrames(). As well as logging
37755 ** this function notifies any active backup processes that the pages have
37833 ** This function is called as part of the transition from PAGER_OPEN
37845 ** function returns zero if the WAL is not open (i.e. Pager.pWal==0), or
37901 ** function. Because an EXCLUSIVE lock on the db file is required to delete
38042 ** pager_playback() function for additional information.
38201 ** Set the busy handler function.
38219 ** returned to the caller of the pager API function.
38223 int (*xBusyHandler)(void *), /* Pointer to busy-handler function */
38234 ** If the pager is in the error state when this function is called, it
38250 ** If the page size is changed, then this function uses sqlite3PagerMalloc()
38257 ** function was called, or because the memory allocation attempt failed,
38264 ** function may be called from within PagerOpen(), before the state
38267 ** At one point this function returned an error if the pager was in
38269 ** there is at least one outstanding page reference, this function
38369 ** function is used to read database headers, and a new transient or
38398 ** This function may only be called when a read-transaction is open on
38413 ** a similar or greater lock is already held, this function is a no-op
38445 ** Function assertTruncateConstraint(pPager) checks that one of the
38453 ** (as determined by function subjRequiresPage()).
38455 ** If the condition asserted by this function were not true, and the
38480 ** function does not actually modify the database file on disk. It
38493 ** This function is called before attempting a hot-journal rollback. It
38523 ** with this page cache after this function returns will likely
38526 ** This function always succeeds. If a transaction is active an attempt
38603 ** If the Pager.noSync flag is set, then this function is a no-op.
38746 ** by the PgHdr.pDirty pointer. This function writes each one of the
38748 ** be NULL, representing an empty list. In this case this function is
38751 ** The pager must hold at least a RESERVED lock when this function
38779 /* This function is only called for rollback pagers in WRITER_DBMOD state. */
38858 ** function is a no-op.
38879 ** that it is really required before calling this function.
38884 ** This function returns SQLITE_OK if everything is successful, an IO
38928 ** This function is called by the pcache layer when it has reached some
38936 ** The job of this function is to make pPg clean by writing its contents
39068 ** and error code returned. This function may return SQLITE_NOMEM
39079 void (*xReinit)(DbPage*) /* Function to reinitialize pages */
39335 ** This function is called after transitioning from PAGER_UNLOCK to
39338 ** needs to be played back. According to this function, a hot-journal
39456 ** This function is called to obtain a shared lock on the database file.
39457 ** It is illegal to call sqlite3PagerAcquire() until after this function
39459 ** this function is called, it is a no-op.
39461 ** The following operations are also performed by this function.
39532 ** downgraded to SHARED_LOCK before this function returns.
39550 ** function was called and the journal file does not exist.
39657 ** mode. Otherwise, the following function call is a no-op.
39712 ** already in the cache when this function is called, then the extra
39775 ** pager was already in the error-state when this function was called.
39889 ** This function is called at the start of every write transaction.
39895 ** as well. This function is only used when the journal file is being
39900 ** then this function just writes a journal header to the start of the
39903 ** Whether or not the journal file is opened by this function, the
39918 /* If already in the error state, this function is a no-op. But on
39978 ** write-transaction has already been opened, this function is a no-op.
40085 /* Higher-level routines never call this function if database is not
40200 ** of this function and be careful not to change any page data unless
40203 ** The difference between this function and pager_write() is that this
40204 ** function
40231 ** this function.
40357 ** sqlite3OsWrite() function.
40370 ** to this function. Otherwise, it is always set to zero.
40394 /* If page one was fetched successfully, and this function is not
40434 ** function returns SQLITE_OK. Otherwise, an IO error code is returned.
40448 ** This function may only be called while a write-transaction is active in
40522 ** function has already been called, it is mostly a no-op. However, any
40549 ** pager_incr_changecounter() function is called to update the change
40677 ** When this function is called, the database file has been completely
40683 ** This function finalizes the journal file, either by deleting,
40707 ** using persistent journals, then this function is a no-op.
40736 ** If the pager is already in PAGER_ERROR state when this function is called,
40739 ** Otherwise, in rollback mode, this function performs two functions:
40854 ** equal to nSavepoint, then this function is a no-op.
40910 ** This function is called to rollback or release (commit) a savepoint.
40923 ** (Pager.nSavepoint-1), then this function is a no-op.
40925 ** If a negative value is passed to this function, then the current
40927 ** sqlite3PagerRollback() because this function does not terminate
40935 ** This function may return SQLITE_NOMEM if a memory allocation fails,
41070 ** This function may return SQLITE_NOMEM or an IO error code if an error
41108 ** one or more savepoint bitvecs. This is the reason this function
41397 ** This function is called when the user invokes "PRAGMA checkpoint".
41442 ** exclusive-locking mode when this function is called, take an EXCLUSIVE
41476 ** this function.
41520 ** This function is called to close the connection to the log file prior
41523 ** Before closing the log file, this function attempts to take an
41566 ** This function is called by the wal module when writing page content
41569 ** This function returns a pointer to a buffer containing the encrypted
41570 ** page content. If a malloc fails, this function may return NULL.
42222 ** This function encodes a single frame header and writes it to a buffer
42376 ** between 0 and (HASHTABLE_NSLOT-1). The walHashNext() function advances
42466 ** This function is called whenever pWal->hdr.mxFrame is decreased due
42636 ** this function returns.
42805 ** A SHARED lock should be held on the database file when this function
42914 ** This function merges two sorted lists into a single sorted list.
43061 ** of memory will be freed before this function returns.
43839 ** This function starts a write transaction on the WAL.
43898 ** function moves the write-pointer back to the start of the transaction.
43900 ** Additionally, the callback function is invoked for each frame written
43905 ** Otherwise, if the callback function does not return an error, this
43906 ** function returns SQLITE_OK.
43945 ** values. This function populates the array with values required to
43989 ** This function is called just before writing a set of frames to the log
44286 ** This function is called to change the WAL subsystem into or out
44820 ** about a cell. The parseCellPtr() function fills in this structure
44864 struct KeyInfo *pKeyInfo; /* Argument passed to comparison function */
45302 ** exited at the end of the same function.
45464 **** This function is only used as part of an assert() statement. ***
45479 ** function has to search through the database schema.
45549 **** This function may be used as part of assert() statements only. ****
45646 ** This function assumes the following:
45668 ** obtain a read-lock using this function. The only read-lock obtained
45673 /* This function should only be called on a sharable b-tree after it
45718 ** This function assumes that Btree p has an open read or write
45751 /* This function is called when Btree p is concluding its
45765 ** This function changes all write-locks held by Btree p into read-locks.
45820 ** This function is called before modifying the contents of a table
45907 ** This function is called when a free-list leaf page is removed from the
46243 ** are two versions of this function. btreeParseCell() takes a
46342 /* The value returned by this function should always be the same as
46345 ** this function verifies that this invariant is not violated. */
47070 int rc = SQLITE_OK; /* Result code from this function */
47703 ** The caller detects this and calls this function again. This is
47742 ** zero and return SQLITE_OK. The caller will call this function
48223 ** point in calling this function again), return SQLITE_DONE.
48225 ** More specificly, this function attempts to re-organize the
48229 ** If the nFin parameter is non-zero, this function assumes
48266 ** truncated to zero after this function returns, so it doesn't
48340 ** A write-transaction must be opened before calling this function.
48343 ** If the incremental vacuum is finished after this function has run,
48484 ** This function is called from both BtreeCommitPhaseTwo() and BtreeRollback()
48705 ** using the sqlite3BtreeSavepoint() function.
48727 ** The second argument to this function, op, is always SAVEPOINT_ROLLBACK
48728 ** or SAVEPOINT_RELEASE. This function either releases or rolls back the
48797 struct KeyInfo *pKeyInfo, /* First arg to comparison function */
48951 ** compiler is not doing agressive inlining.) So we use a real function
48966 /* Use a real function in MSVC to work around bugs in that compiler. */
48977 /* Use a macro in all other compilers so that the function is inlined */
49031 ** Failure is not possible. This function always returns SQLITE_OK.
49045 ** ovfl), this function finds the page number of the next page in the
49152 ** This function is used to read or overwrite payload information
49165 ** cursor entry uses one or more overflow pages, this function
49273 ** function.
49455 ** This function returns SQLITE_CORRUPT if the page-header flags field of
49488 ** Page pParent is an internal (non-leaf) tree page. This function
49543 ** If this function returns successfully, it may be assumed that the
49594 ** case as the call to this function that loaded the root-page (either
50377 ** This function is used to add page iPage to the database file free-list.
50380 ** The value passed as the second argument to this function is optional.
50386 ** its reference count is not altered by this function.
50799 ** cell. The caller will overwrite them after this function returns. If
50976 /* This error condition is now caught prior to reaching this function */
51049 ** This function does not contribute anything to the operation of SQLite.
51090 ** This function is used to copy the contents of the b-tree node stored
51102 ** The performance of this function is not critical. It is only used by
51175 ** The third argument to this function, aOvflSpace, is a pointer to a
51178 ** used to store the parent's overflow cells. Because this function inserts
51184 ** If aOvflSpace is set to a null pointer, this function returns
51231 ** index iParentIdx. This scenario comes about when this function
51248 ** way, the remainder of the function does not have to deal with any
51295 ** four bytes of it, and this function does not need the first
51363 ** The rest of this function will use data from the copies rather
51677 ** siblings when this function was called. These have already
51796 ** This function is called when the root page of a b-tree structure is
51860 ** some way. This function figures out if this modification means the
51884 ** balance_deeper() function to create a new child for the root-page
51924 ** function. If this were not verified, a subtle bug involving reuse
51960 ** balance_nonroot(), or just before this function returns, whichever
52000 ** point to any entry or to no entry at all and so this function has to seek
52049 ** integer key to use. It then calls this function to actually insert the
52625 ** This function may only be called if the b-tree connection already
53153 ** this function.
53337 ** This function returns a pointer to a blob of memory associated with
53351 ** Just before the shared-btree is closed, the function passed as the
53353 ** blob of allocated memory. This function should not call sqlite3_free()
53412 ** This function modifies the data stored as part of that entry.
53415 ** change the length of the data stored. If this function is called with
53457 ** This function sets a flag only. The actual page location cache
53458 ** (stored in BtCursor.aOverflow[]) is allocated and used by function
53459 ** accessPayload() (the worker function for sqlite3BtreeData() and
53560 ** * Via the sqlite3_backup_XXX() API function backup_step() and
53590 ** function. If an error occurs while doing so, return 0 and write an
53775 ** this function is a no-op.
53844 ** before this function exits.
53977 /* If bCloseTrans is true, then this function opened a read transaction
54070 ** This function is called after the contents of page iPage of the
54078 ** corresponding to the source database is held when this function is
54107 ** corresponding to the source database is held when this function is
54136 ** from this function, not directly by the user.
54232 ** and the third argument passed to this function is true, the
54236 ** This function sets the MEM_Dyn flag and clears any xDel callback.
54360 ** A MEM_Null value will never be passed to this function. This function is
54403 ** Memory cell pMem contains the context of an aggregate function.
54404 ** This routine calls the finalize method for that function. The
54432 ** invoking an external callback, free it now. Calling this function
54856 void (*xDel)(void*) /* Destructor function */
54939 ** Two NULL values are considered equal by this function.
55017 ** comparison function directly */
55038 /* If a NULL pointer was passed as the collate function, fall through
55110 /* This function is only available internally, it is not part of the
55449 ** Use the sqlite3VdbeResolveLabel() function to fix an address and
55450 ** the sqlite3VdbeChangeP4() function to change the value of the P4
55583 ** The following type and function are used to iterate through all opcodes
55665 ** match, or false otherwise. This function is intended to be used as
55699 #endif /* SQLITE_DEBUG - the sqlite3AssertMayAbort() function */
55760 ** This function returns a pointer to the array of opcodes associated with
55763 ** vdbeFreeOpArray() function.
56652 ** This function may be called more than once on a single virtual machine.
56657 ** the function is called. On subsequent calls, from sqlite3_reset(), nVar
56694 ** an array to marshal SQL function arguments in. This is only done the
56695 ** first time this function is called for a given VDBE, not when it is
57291 ** function is a no-op.
57304 ** This function is called when a transaction opened by the database
57309 ** If there are outstanding FK violations and this function returns
57343 /* This function contains the logic that determines if a statement or
57391 ** file as part of an effort to free up cache space (see function
57664 ** The difference between this function and sqlite3VdbeDelete() is that
58062 ** The calling function might provide szSpace bytes of memory
58139 ** sqlite3VdbeUnpackRecord() function above, which makes all
58151 ** This function compares the two table rows or index records
58420 ** sequences, or changing an authorization function are the types of
58500 ** collating sequences are registered or if an authorizer function is
58661 ** the function result.
58668 sqlite3_context *pCtx, /* Function context */
58672 void (*xDel)(void*) /* Destructor function */
58787 ** This function is called after a transaction has been committed. It
58980 ** application defined function.
58988 ** The following is the implementation of an SQL function that always
58989 ** fails with an error message stating that the function is used in the
58991 ** SQL function that use this routine so that the functions will exist
58996 sqlite3_context *context, /* The function calling context */
58997 int NotUsed, /* Number of arguments to the function */
59004 "unable to use function %s in the requested context", zName);
59010 ** Allocate or return the aggregate context for a user function. A new
59039 ** the user-function defined by pCtx.
59053 ** Set the auxilary data pointer and delete function, for the iArg'th
59054 ** argument to the user-function defined by pCtx. Any previous value is
59055 ** deleted by calling the delete function specified when it was set.
59098 ** Return the number of times the Step function of a aggregate has been
59101 ** This function is deprecated. Do not use it for new code. It is
59102 ** provide only to avoid breaking legacy code. New aggregate function
59175 ** This function is called after invoking an sqlite3_value_XXX function on a
59272 /* The following function is experimental and subject to change or
59830 ** The calling function is responsible for making sure the memory returned
59960 ** function which does the work of interpreting a VDBE program.
59986 ** working correctly. This variable has no function other than to
59998 ** This facility is used for testing purposes only. It does not function
60009 ** has no function other than to help verify the correct operation of the
60020 ** is working correctly. This variable has no function other than to
60036 ** has no function other than to help verify the correct operation of the
60084 ** user-defined function or returned to the user as the result of a query.
60232 ** Try to convert the type of a function argument or a result column
60463 ** stub function. You will lose timing support for many
60494 ** This function is only called from within an assert() expression. It
60587 ** reduce the amount of stack space required by this function.
61741 ** P4 is a pointer to a CollSeq struct. If the next call to a user function
61755 /* Opcode: Function P1 P2 P3 P4 P5
61757 ** Invoke a user function (P4 is a pointer to a Function structure that
61758 ** defines the function) with P5 arguments taken from register P2 and
61759 ** successors. The result of the function is stored in register P3.
61760 ** Register P3 must not be one of the function inputs.
61763 ** function was determined to be constant at compile time. If the first
61765 ** whether meta data associated with a user function argument using the
61813 ** the pointer to u.ag.ctx.s so in case the user-function can use
61829 ** user function may have called an sqlite3_result_XXX() function
61837 /* If any auxiliary data functions have been called by this user function,
61846 /* If the function returned an error, throw an exception */
61852 /* Copy the result of the function into register P3 */
62097 ** are text, then the appropriate collating function specified in
63753 /* Use the ceiling() function to convert real->int */
63756 /* Use the floor() function to convert real->int */
64277 ** sqlite3_last_insert_rowid() function (otherwise it is unmodified).
65394 ** exception using the RAISE() function. Register P3 contains the address
65651 ** Execute the step function for an aggregate. The
65652 ** function has P5 arguments. P4 is a pointer to the FuncDef
65653 ** structure that specifies the function. Use register
65708 ** Execute the finalizer function for an aggregate. P1 is
65711 ** P2 is the number of arguments that the step function takes and
65712 ** P4 is a pointer to the FuncDef for this function. The P2
65716 ** the step function was not previously called.
66153 ** the current contents to u.ci.sContext.s so in case the user-function
66166 /* Copy the result of the function to the P3 register. We
66536 ** This function is used by both blob_open() and blob_reopen(). It seeks
66630 ** The sqlite3_blob_close() function finalizes the vdbe program,
66992 ** 2) The sqlite3JournalCreate() function is called.
68037 ** function names. The operator for aggregate functions is changed
68111 /* Resolve function names
68117 int no_such_func = 0; /* True if no such function exists */
68119 int is_agg = 0; /* True if is an aggregate function */
68120 int auth; /* Authorization to use the function */
68121 int nId; /* Number of characters in function name */
68122 const char *zId; /* The function name. */
68123 FuncDef *pDef; /* Information about the function */
68146 sqlite3ErrorMsg(pParse, "not authorized to use function: %s",
68156 sqlite3ErrorMsg(pParse, "misuse of aggregate function %.*s()", nId,zId);
68160 sqlite3ErrorMsg(pParse, "no such function: %.*s", nId, zId);
68163 sqlite3ErrorMsg(pParse,"wrong number of arguments to function %.*s()",
68175 ** type of the function
68696 ** checking on function usage and set a flag if any aggregate functions
68722 ** Table-name and function resolution occurs on the substituted expression
68731 ** Function calls are checked to make sure that the function is
68733 ** If the function is an aggregate function, then the pNC->hasAgg is
69143 ** Set the Expr.nHeight variable using the exprSetHeight() function. If
69170 ** obtained from sqlite3DbMalloc(). The calling function
69317 ** Construct a new expression node for a function with multiple
69463 ** The dupedExprStructSize() function returns two values OR-ed together:
69506 ** This function returns the space in bytes required to store the copy
69543 ** This function is similar to sqlite3ExprDup(), except that if pzBuffer
69548 ** portion of the buffer copied into by this function.
69967 ** and 0 if it involves variables or function calls.
69969 ** For the purposes of this function, a double-quoted string (ex: "abc")
69980 ** Return 0 if it involves variables or function calls or terms from
69989 ** or a function call with constant arguments. Return and 0 if there
69992 ** For the purposes of this function, a double-quoted string (ex: "abc")
70184 ** This function is used by the implementation of the IN (...) operator.
70190 ** or ephermal table) is stored in pX->iTable before this function returns.
70191 ** The returned value of this function indicates the b-tree type, as follows:
70214 ** When the b-tree is being used for membership tests, the calling function
70264 /* This function is only called from two places. In both cases the vdbe
71065 ** register if it is convenient to do so. The calling function
71336 ExprList *pFarg; /* List of function arguments */
71337 int nFarg; /* Number of function arguments */
71338 FuncDef *pDef; /* The function definition object */
71339 int nId; /* Length of the function name in bytes */
71340 const char *zId; /* The function name */
71341 int constMask = 0; /* Mask of function arguments that are constant */
71360 sqlite3ErrorMsg(pParse, "unknown function: %.*s()", nId, zId);
71393 /* Possibly overload the function if the first argument is
71401 ** function. The expression "A glob B" is equivalent to
71403 ** for function overloading. But we use the B term in "glob(B,A)".
71817 /* The arguments to a function have a fixed destination.
72419 ** function that is already in the pAggInfo structure
72587 ** This function is used by SQL generated to implement the
72649 ** This C function implements an SQL user function that is used by SQL code
72712 /* This function is used by SQL generated to implement the
72793 FUNCTION(sqlite_rename_table, 2, 0, 0, renameTableFunc),
72795 FUNCTION(sqlite_rename_trigger, 2, 0, 0, renameTriggerFunc),
72798 FUNCTION(sqlite_rename_parent, 3, 0, 0, renameParentFunc),
72811 ** This function is used to create the text of expressions of the form:
72891 ** pTab->zName if this function is being called to code part of an
73033 /* If this is a virtual table, invoke the xRename() function if
73165 ** This function is called after an "ALTER TABLE ... ADD" statement
73282 ** This function is called by the parser after the table-name in
73329 ** sqlite3AddColumn() function and friends to modify. But modify
73944 ** If an OOM error occurs, this function always sets db->mallocFailed.
74118 ** An SQL user-function registered to do the work of an ATTACH statement. The
74119 ** three arguments to the function come directly from an attach statement:
74292 ** An SQL user-function registered to do the work of an DETACH statement. The
74293 ** three arguments to the function come directly from a detach statement:
74632 ** Set or clear the access authorization function.
74634 ** The access authorization function is be called during the compilation
74636 ** various fields of the database. The first argument to the auth function
74638 ** to the auth function is one of these constants:
74664 ** The third and fourth arguments to the auth function are the name of
74665 ** the table and the column that are being accessed. The auth function
74673 ** Setting the auth function to NULL disables this hook. The default
74674 ** setting of the auth function is NULL.
74691 ** user-supplied authorization function returned an illegal value.
74700 ** table zTab in database zDb. This function assumes that an authorization
74736 ** If the auth function returns SQLITE_IGNORE, change the TK_COLUMN
74737 ** instruction into a TK_NULL. If the auth function returns SQLITE_DENY,
75402 ** function.
75439 ** function returns the index of the named database in db->aDb[], or
76042 ** Set the collation function of the most recently parsed table column
76077 ** This function returns the collation sequence for database native text
76158 ** which to write into the output buffer. This function copies the
76194 ** from sqliteMalloc() and must be freed by the calling function.
76676 ** This function is called by the VDBE to adjust the internal schema
77171 ** call above. Just before that function was freed they were released
78218 ** This function is called by the parser when it parses a command to create,
78454 ** collating function. Forms 3 and 4 rebuild the named index or all
78596 ** collation function in the best encoding but there may be other versions
78597 ** of this collation function (for other text encodings) available. Use one
78618 ** This function is responsible for invoking the collation factory callback
78744 ** A separate function sqlite3LocateCollSeq() is a wrapper around
78769 /* During the search for the best function definition, this procedure
78770 ** is called to test how well the function passed as the first argument
78771 ** matches the request for a function with nArg arguments in a system
78777 ** 0: Not a match, or if nArg<0 and the function is has no implementation.
78778 ** 1: A variable arguments function that prefers UTF-8 when a UTF-16
78780 ** 2: A variable arguments function that uses UTF-16BE when UTF-16LE is
78782 ** 3: A variable arguments function using the same text encoding.
78783 ** 4: A function with the exact number of arguments requested that
78785 ** 5: A function with the exact number of arguments requested that
78811 ** Search a FuncDefHash for a function with the given name. Return
78817 const char *zFunc, /* Name of function */
78834 FuncDef *pDef /* The function definition to insert */
78855 ** Locate a user function given a name, a number of arguments and a flag
78856 ** indicating whether the function prefers UTF-16 over UTF-8. Return a
78857 ** pointer to the FuncDef structure that defines that function, or return
78858 ** NULL if the function does not exist.
78862 ** no matching function previously existed. When createFlag is true
78863 ** and the nArg parameter is -1, then only a function that accepts
78867 ** function found is returned. A function is valid if either xFunc
78870 ** If createFlag is false, then a function with the required name and
78876 const char *zName, /* Name of the function. Not null-terminated */
78906 ** functions even if a prior app-defined function was found. And give
78910 ** install a new function. Whatever FuncDef structure is returned it will
78912 ** new function. But the FuncDefs for built-in functions are read-only.
78913 ** So we must not search for built-ins when creating a new function.
78951 ** at a Schema struct. This function does not call sqlite3DbFree(db, ) on the
79346 ** API function sqlite3_count_changes) to be set incorrectly. */
79431 ** invoke the callback function.
79657 ** There is only one exported symbol in this file - the function
79663 ** Return the collating function associated with a function.
79721 ** Implementation of the length() function
79758 ** Implementation of the abs() function.
79760 ** IMP: R-23979-26855 The abs(X) function returns the absolute value of
79802 ** Implementation of the substr() function.
79896 ** Implementation of the round() function
80003 #if 0 /* This function is never used. */
80029 #define ifnullFunc versionFunc /* Substitute function - never called */
80081 ** Implementation of the last_insert_rowid() SQL function. The return
80082 ** value is the same as the sqlite3_last_insert_rowid() API function.
80091 /* IMP: R-51513-12026 The last_insert_rowid() SQL function is a
80093 ** function. */
80098 ** Implementation of the changes() SQL function.
80100 ** IMP: R-62073-11209 The changes() SQL function is a wrapper
80101 ** around the sqlite3_changes() C/C++ function and hence follows the same
80115 ** Implementation of the total_changes() SQL function. The return value is
80116 ** the same as the sqlite3_total_changes() API function.
80125 /* IMP: R-52756-41993 This function is a wrapper around the
80308 ** Implementation of the like() SQL function. This function implements
80309 ** the build-in LIKE operator. The first argument to the function is the
80316 ** This same function (with a different compareInfo structure) computes
80368 ** Implementation of the NULLIF(x,y) function. The result is the first
80385 ** Implementation of the sqlite_version() function. The result is the version
80394 /* IMP: R-48699-48617 This function is an SQL wrapper around the
80400 ** Implementation of the sqlite_source_id() function. The result is a string
80410 /* IMP: R-24470-31136 This function is an SQL wrapper around the
80416 ** Implementation of the sqlite_compileoption_used() function.
80430 ** function is a wrapper around the sqlite3_compileoption_used() C/C++
80431 ** function.
80440 ** Implementation of the sqlite_compileoption_get() function.
80453 /* IMP: R-04922-24076 The sqlite_compileoption_get() SQL function
80454 ** is a wrapper around the sqlite3_compileoption_get() C/C++ function.
80469 ** EXPERIMENTAL - This is not an official function. The interface may
80470 ** change. This function may disappear. Do not write code that depends
80471 ** on this function.
80473 ** Implementation of the QUOTE() function. This function takes a single
80541 ** The hex() function. Interpret the argument as a blob. Return
80570 ** The zeroblob(N) function returns a zero-filled blob of size N bytes.
80592 ** The replace() function. Three arguments are all strings: call
80762 /* IMP: R-25361-16150 This function is omitted from SQLite by default. It
80770 ** IMP: R-59782-00072 The soundex(X) function returns a string that is the
80824 ** A function that loads a shared-library extension then returns NULL.
80861 ** The SUM() function follows the (broken) SQL standard which means
80923 ** count() aggregate function.
80931 ** Routines to implement the count() aggregate function.
80941 /* The sqlite3_aggregate_count() function is deprecated. But just to make
80975 /* This step function is used for both the min() and max() aggregates,
80978 ** sqlite3_user_data() function returns (void *)-1. For min() it
81055 ** This routine does per-connection function registration. Most
81056 ** of the built-in functions above are part of the global function set.
81068 ** Set the LIKEOPT flag on the 2-argument function with the given name.
81101 ** pExpr points to an expression which implements a function. If
81102 ** it is appropriate to apply the LIKE optimization to that function
81104 ** return TRUE. If the function is not a LIKE-style function then
81137 ** to the global function hash table. This occurs at start-time (as
81152 FUNCTION(ltrim, 1, 1, 0, trimFunc ),
81153 FUNCTION(ltrim, 2, 1, 0, trimFunc ),
81154 FUNCTION(rtrim, 1, 2, 0, trimFunc ),
81155 FUNCTION(rtrim, 2, 2, 0, trimFunc ),
81156 FUNCTION(trim, 1, 3, 0, trimFunc ),
81157 FUNCTION(trim, 2, 3, 0, trimFunc ),
81158 FUNCTION(min, -1, 0, 1, minmaxFunc ),
81159 FUNCTION(min, 0, 0, 1, 0 ),
81161 FUNCTION(max, -1, 1, 1, minmaxFunc ),
81162 FUNCTION(max, 0, 1, 1, 0 ),
81164 FUNCTION(typeof, 1, 0, 0, typeofFunc ),
81165 FUNCTION(length, 1, 0, 0, lengthFunc ),
81166 FUNCTION(substr, 2, 0, 0, substrFunc ),
81167 FUNCTION(substr, 3, 0, 0, substrFunc ),
81168 FUNCTION(abs, 1, 0, 0, absFunc ),
81170 FUNCTION(round, 1, 0, 0, roundFunc ),
81171 FUNCTION(round, 2, 0, 0, roundFunc ),
81173 FUNCTION(upper, 1, 0, 0, upperFunc ),
81174 FUNCTION(lower, 1, 0, 0, lowerFunc ),
81175 FUNCTION(coalesce, 1, 0, 0, 0 ),
81176 FUNCTION(coalesce, 0, 0, 0, 0 ),
81177 /* FUNCTION(coalesce, -1, 0, 0, ifnullFunc ), */
81179 FUNCTION(hex, 1, 0, 0, hexFunc ),
81180 /* FUNCTION(ifnull, 2, 0, 0, ifnullFunc ), */
81182 FUNCTION(random, 0, 0, 0, randomFunc ),
81183 FUNCTION(randomblob, 1, 0, 0, randomBlob ),
81184 FUNCTION(nullif, 2, 0, 1, nullifFunc ),
81185 FUNCTION(sqlite_version, 0, 0, 0, versionFunc ),
81186 FUNCTION(sqlite_source_id, 0, 0, 0, sourceidFunc ),
81188 FUNCTION(sqlite_compileoption_used,1, 0, 0, compileoptionusedFunc ),
81189 FUNCTION(sqlite_compileoption_get, 1, 0, 0, compileoptiongetFunc ),
81191 FUNCTION(quote, 1, 0, 0, quoteFunc ),
81192 FUNCTION(last_insert_rowid, 0, 0, 0, last_insert_rowid),
81193 FUNCTION(changes, 0, 0, 0, changes ),
81194 FUNCTION(total_changes, 0, 0, 0, total_changes ),
81195 FUNCTION(replace, 3, 0, 0, replaceFunc ),
81196 FUNCTION(zeroblob, 1, 0, 0, zeroblobFunc ),
81198 FUNCTION(soundex, 1, 0, 0, soundexFunc ),
81201 FUNCTION(load_extension, 1, 0, 0, loadExt ),
81202 FUNCTION(load_extension, 2, 0, 0, loadExt ),
81525 ** This function is called when a row is inserted into or deleted from the
81527 ** on the child table of pFKey, this function is invoked twice for each row
81531 ** Each time it is called, this function generates VDBE code to locate the
81666 ** This function is called to generate code executed when a row is deleted
81669 ** code for an SQL UPDATE operation, this function may be called twice -
81672 ** The code generated by this function scans through the rows in the child
81804 ** This function returns a pointer to the head of a linked list of FK
81811 ** Calling this function with table "t1" as an argument returns a pointer
81813 ** "t2". Calling this function with "t2" as the argument would return a
81824 ** fkActionTrigger() routine. This function deletes the Trigger structure
81842 ** This function is called to generate code that runs when table pTab is
81844 ** to this function contains a single entry guaranteed to resolve to
81900 ** This function is called when inserting, deleting or updating a row of
81914 ** For an UPDATE operation, this function is called twice. Once before
81935 /* If foreign-keys are disabled, this function is a no-op. */
82064 ** This function is called before generating code to update or delete a
82090 ** This function is called before generating code to update or delete a
82099 ** If any foreign key processing will be required, this function returns
82100 ** true. If there is no foreign key related processing, this function
82150 ** This function is called when an UPDATE or DELETE operation is being
82360 ** This function is called when deleting or updating a row to implement
82792 ** See the xferOptimization() function for the implementation of this
83460 ** invoke the callback function.
84286 ** the xCallback() function is called. pArg becomes the first
84332 /* Invoke the callback function if required */
84948 ** also check to make sure that the pointer to the function is
85023 0, /* Was sqlite3_global_recover(), but that function is deprecated */
85210 ** error message text. The calling function should free this memory
85740 ** defined in pager.h. This function returns the associated lowercase
87205 ** will be closed before this function returns. */
87483 ** function should never be used.
87778 /* This function currently works by first transforming the UTF-16
88073 ** This function is used to add terms implied by JOIN syntax to the
88535 /* Send the data to the callback function or to a subroutine. In the
88590 ** function is responsible for seeing that this structure is eventually
88639 ** Unless an "EXPLAIN QUERY PLAN" command is being processed, this function
88657 ** Unless an "EXPLAIN QUERY PLAN" command is being processed, this function
88665 ** function parameters, and op is the text representation of the parameter
88810 ** considered a column by this function.
89393 assert( p && p->pPrior ); /* Calling function guarantees this much */
89413 assert( v!=0 ); /* The VDBE already created by calling function */
90303 ** by the calling function */
90475 ** until we introduced the group_concat() function.
90915 ** function tests if the SELECT is of the form:
91239 ** The calling function can detect the problem by looking at pParse->nErr
91374 ** Invoke the OP_AggFinalize opcode for every aggregate function
91514 ** calling function needs to do that.
91533 int rc = 1; /* Value to return from this function */
92302 ** to the callback function is uses to build the result.
92550 ** sqlite3FinishTrigger() function is called to complete the trigger
92939 ** This function is called to drop a trigger from the database schema.
93224 ** This function is used to add VdbeComment() annotations to a VDBE
93403 ** function are the same as those described in the header function for
93446 ** operation on pTab, this function is a no-op.
93469 ** ON INSERT trigger, the value passed to this function as parameter reg
93517 ** This function returns a 32-bit bitmask indicating which columns of the
93623 ** function is capable of transforming these types of expressions into
94119 ** invoke the callback function.
94601 ** The actual function that does the work of creating a new module.
94602 ** This function implements the sqlite3_create_module() and
94610 void (*xDestroy)(void *) /* Module destructor function */
94645 ** External API function used to create a new virtual-table module.
94657 ** External API function used to create a new virtual-table module.
94664 void (*xDestroy)(void *) /* Module destructor function */
94716 ** Table p is a virtual table. This function moves all elements in the
94729 ** above function sqlite3VtabUnlockList() for an explanation of why
94759 ** This function may only be called when the mutexes associated with all
94764 ** 1) By this function. In this case, all BtShared mutexes and the mutex
94767 ** 2) By function vtabDisconnectAll(), when it adds a VTable entry to
95010 ** pointer to the function to invoke is passed as the fourth parameter
95113 ** This function is invoked by the parser to call the xConnect() method
95175 ** This function is invoked by the vdbe to call the xCreate method
95216 ** This function is used to set the schema of a virtual table. It is only
95217 ** valid to call this function from within the xCreate() or xConnect() of a
95278 ** This function is invoked by the vdbe to call the xDestroy method
95308 ** This function invokes either the xRollback or xCommit method
95393 ** than zero, then this function is being called from within a
95426 ** The first parameter (pDef) is a function implementation. The
95427 ** second parameter (pExpr) is the first argument to this function.
95429 ** table implementation have an opportunity to overload the function.
95440 FuncDef *pDef, /* Function to possibly overload */
95441 int nArg, /* Number of arguments to the function */
95442 Expr *pExpr /* First argument to the function */
95468 ** to see if the implementation wants to overload this function
95482 /* Create a new ephemeral function definition for the overloaded
95483 ** function */
95947 ** In order for this routine to work, the calling function must have
96224 ** function, then no OP_Variable will be added to the program.
97423 ** by passing the pointer returned by this function to sqlite3_free().
97525 ** The table object reference passed as the second argument to this function
97526 ** must represent a virtual table. This function invokes the xBestIndex()
97607 ** malloc in allocateIndexInfo() fails and this function returns leaving
97735 ** If successful, this function determines which of the regions value
97856 ** This function is used to estimate the number of rows that will be visited
97988 ** the SQL statement, then this function only considers plans using the
98373 ** as the last parameter. This function may calculate the cost of
98681 ** function returns a pointer to a string buffer containing a description
98689 ** is run and there is an index on (a, b), then this function returns a
98729 ** This function is a no-op unless currently processing an EXPLAIN QUERY PLAN
99082 ** was passed to this function to implement a "SELECT min(x) ..."
99504 ** should invoke sqlite3WhereEnd() with the return value of this function
99598 WhereInfo *pWInfo; /* Will become the return value of this function */
99618 /* This function normally generates a nested loop for all tables in
99915 /* If an INDEXED BY clause is used, the bestIndex() function is
101544 ** This function allocates a new parser.
101545 ** The only argument is a pointer to a function which works like
101549 ** A pointer to the function used to allocate memory.
101572 /* The following function deletes the value associated with a
101700 ** <li> A pointer to a function used to reclaim memory obtained
101706 void (*freeProc)(void*) /* Function used to reclaim memory */
102876 sqlite3ErrorMsg(pParse, "too many arguments on function %T", &yymsp[-4].minor.yy0);
103554 ** * Call the %syntax_error function.
103693 ** The sqlite3KeywordCode function looks up an identifier to determine if
103711 ** The code in this file implements a function that determines whether
104850 /* IMPLEMENTATION-OF: R-53536-42575 The sqlite3_libversion() function returns
104855 /* IMPLEMENTATION-OF: R-63124-39300 The sqlite3_sourceid() function returns a
104861 /* IMPLEMENTATION-OF: R-35210-63508 The sqlite3_libversion_number() function
104866 /* IMPLEMENTATION-OF: R-54823-41343 The sqlite3_threadsafe() function returns
104874 ** If the following function pointer is not NULL and if
104876 ** I/O active are written using this function. These messages
105222 ** The default is NULL. Logging is disabled if the function pointer is
105350 ** This is the default collating function named "BINARY" which is always
105422 ** Close all open savepoints. This function only manipulates fields of the
105438 ** Invoke the destructor function associated with FuncDef p, if any. Except,
105439 ** if this is not the last copy of the function, do not invoke it. Multiple
105440 ** copies of a single function are created when create_function() is called
105729 ** given callback function with the given argument.
105747 ** given callback function with the given argument. The progress callback will
105794 ** This function is exactly the same as sqlite3_create_function(), except
105828 ** If SQLITE_ANY is specified, add three versions of the function
105850 /* Check if an existing function is being overridden or deleted. If so,
105851 ** and there are active VMs, then return SQLITE_BUSY. If a function
105859 "unable to delete/modify user-function due to active statements");
105873 /* If an older version of the function with a configured destructor is
105874 ** being replaced invoke the destructor function here. */
105969 ** Declare that a function has been overloaded by a virtual table.
105971 ** If the function already exists as a regular global function, then
105972 ** this routine is a no-op. If the function does not exist, then create
105975 ** When virtual tables intend to provide an overloaded function, they
105976 ** should call this routine to make sure the global function exists.
105977 ** A global function must exist in order for name resolution to work
105999 ** Register a trace function. The pArg from the previously registered trace
106002 ** A NULL trace function means that no tracing is executes. A non-NULL
106003 ** trace is a pointer to a function that is invoked at the start of each
106016 ** Register a profile function. The pArg from the previously registered
106017 ** profile function is returned.
106019 ** A NULL profile function means that no profiling is executes. A non-NULL
106020 ** profile is a pointer to a function that is invoked at the conclusion of
106040 ** Register a function to be invoked when a transaction comments.
106041 ** If the invoked function returns non-zero, then the commit becomes a
106046 int (*xCallback)(void*), /* Function to invoke on each commit */
106047 void *pArg /* Argument to the function */
106065 void *pArg /* Argument to the function */
106082 void (*xCallback)(void*), /* Callback function */
106083 void *pArg /* Argument to the function */
106122 ** The callback registered by this function replaces any existing callback
106125 ** configured by this function.
106199 ** function returns SQLITE_LOCKED and a checkpoint is not attempted. If
106205 ** this function while the checkpoint is running.
106228 ** This function returns true if main-memory should be used instead of
106336 ** passed to this function, we assume a malloc() failed during sqlite3_open().
106358 ** Create a new collating function for database "db". The name is zName
106406 ** Also, collation destructor - CollSeq.xDel() - function
106965 ** This function is now an anachronism. It used to be used to recover from a
107120 /* Whether the function call succeeded or failed, set the output parameters
107153 /* This function works in milliseconds, but the underlying OsSleep()
107473 ** This function is a complex assert() that verifies the following
107510 ** db is not currently a part of the list, this function is a no-op.
107622 ** This function is called while stepping or preparing a statement
107637 ** This function is called when
107641 ** This function loops through each entry in the blocked connections
108125 ** sqlite3_tokenizer_module.xCreate() function of the requested tokenizer
108126 ** implementation. The xCreate() function in turn returns an
108546 ** matchinfo() function. They are populated when the full-text index is
108902 ** If *pRc is non-zero when this function is called, it is a no-op.
108999 ** If *pRc is non-zero when this function is called, it is a no-op.
109057 ** This function is the implementation of both the xConnect and xCreate
109225 ** function sqlite3Fts3SegReaderCost() for details).
109249 ** work is done in function fts3InitVtab().
109310 ** it would lead to an "unable to use function MATCH in the requested
109398 ** This function is used to process a single interior node when searching
109400 ** function via the zNode/nNode parameters. The term to search for is
109403 ** If piFirst is not NULL, then this function sets *piFirst to the blockid
109514 ** contains a term. This function searches the sub-tree headed by the zNode
109527 ** range. Because this function only inspects interior segment nodes (and
109577 ** This function is used to create delta-encoded serialized lists of FTS3
109578 ** varints. Each call to this function appends a single varint to a list.
109591 ** When this function is called, *ppPoslist is assumed to point to the
109602 ** before this function returns.
109635 ** When this function is called, *ppPoslist is assumed to point to the
109648 ** before this function returns. The POS_COLUMN or POS_END terminator
109679 ** This function is used to help parse position-lists. When this function is
109805 ** This function is used to merge two position lists into one. When it is
109816 ** When this function returns, both *pp1 and *pp2 are left pointing to the
110224 ** This function is used as the sqlite3Fts3SegReaderIterate() callback when
110453 ** This function retreives the doclist for the specified term (or term
110511 ** This function counts the total number of docids in the doclist stored
110568 ** This function removes the position information from a doclist. When
110570 ** position information. This function removes the position information so
110597 ** If this function returns SQLITE_OK, but *pnOut is set to a negative value,
110599 ** is only possible when this function is called from within xFilter(). The
110756 ** This function merges two doclists according to the requirements of a
110760 ** includes position information if the first argument to this function
110798 ** This function is used as part of the processing for the snippet() and
110803 ** in Fts3Expr.aDoclist/nDoclist. This function removes all entries from
110888 ** expression pExpr. In other words, this function frees the resources
110908 ** function must be called after Fts3SegReaderArrays have been allocated
110930 ** The following is a helper function (and type) for fts3EvalExpr(). It
110960 ** This function is called in two distinct contexts:
110982 ** If the SQLite invokes the snippet(), offsets() or matchinfo() function
110983 ** as part of a SELECT on an FTS3 table, this function is called on each
110985 ** found in the xFilter() call, then this function is called once for phrase
110988 ** function is called once only for each phrase in the query and the returned
110991 ** Fts3Cursor.doDeferred==1 when this function is called on phrases as a
111158 ** This function is called from within xNext() for each row visited by
111160 ** was able to determine the exact set of matching rows, this function sets
111166 ** load their doclists from disk), this function tests if the current row
111403 ** This function is the implementation of the xUpdate callback used by
111485 ** After ExprLoadDoclist() (see above) has been called, this function is
111534 ** Helper function used by the implementation of the overloaded snippet(),
111544 sqlite3_context *pContext, /* SQL function call context */
111545 const char *zFunc, /* Function name */
111546 sqlite3_value *pVal, /* argv[0] passed to function */
111564 ** Implementation of the snippet() function for FTS3
111567 sqlite3_context *pContext, /* SQLite function call context */
111578 /* There must be at least one argument passed to this function (otherwise
111585 "wrong number of arguments to function snippet()", -1);
111605 ** Implementation of the offsets() function for FTS3
111608 sqlite3_context *pContext, /* SQLite function call context */
111625 ** Implementation of the special optimize() function for FTS3. This
111626 ** function merges all segments in the database to a single segment.
111634 sqlite3_context *pContext, /* SQLite function call context */
111665 ** Implementation of the matchinfo() function for FTS3
111668 sqlite3_context *pContext, /* SQLite function call context */
111689 int nArg, /* Number of SQL function arguments */
111690 const char *zName, /* Name of SQL function */
111716 /* No function of the specified name was found. Return 0. */
111787 ** This function is registered as the module destructor (called when an
111815 ** of the sqlite library, then this function is called directly by
111817 ** function is called by the sqlite3_extension_init() entry point.
112000 ** This function is equivalent to the standard isspace() function.
112110 ** is included in the buffer. This function attempts to tokenize the entire
112210 ** Function getNextNode(), which is called by fts3ExprParse(), may itself
112409 ** inserted into the tree. This function adds pNew, which is always a binary
112436 ** Parse the fts3 query expression found in buffer z, length n. This function
112586 ** an fts3 query expression, respectively. This function attempts to parse the
112664 ** Function to query the hash-table of tokenizers (see README.tokenizers).
112742 ** This is the implementation of a scalar SQL function used to test the
112831 ** Register the query expression parser test function fts3_exprtest()
112968 ** Return a pointer to the appropriate hash function given the key class.
112970 ** The C syntax in this function definition may be unfamilar to some
112973 ** The name of the function is "ftsHashFunction". The function takes a
112975 ** is a pointer to another function. Specifically, the return value
112976 ** of ftsHashFunction() is a pointer to a function that takes two parameters
112989 ** Return a pointer to the appropriate hash function given the key class.
112991 ** For help in interpreted the obscure C code in the function definition,
112992 ** see the header comment on the previous function.
113038 int (*xHash)(const void*,int); /* The hash function */
113055 /* This function (for internal use only) locates an element in an
113067 int (*xCompare)(const void*,int,const void*,int); /* comparison function */
113127 int (*xHash)(const void*,int); /* The hash function */
113161 ** If the "data" parameter to this function is NULL, then the
113174 int (*xHash)(const void*,int); /* The hash function */
113902 ** Implementation of the SQL scalar function for accessing the underlying
113903 ** hash table. This function may be called as follows:
113905 ** SELECT <function-name>(<key-name>);
113906 ** SELECT <function-name>(<key-name>, <pointer>);
113908 ** where <function-name> is the name passed as the second argument
113909 ** to the sqlite3Fts3InitHashTable() function (e.g. 'fts3_tokenizer').
114077 ** Implementation of a special SQL scalar function for testing tokenizers
114079 ** function must be called with two arguments:
114081 ** SELECT <function-name>(<key-name>, <input-string>);
114082 ** SELECT <function-name>(<key-name>, <pointer>);
114084 ** where <function-name> is the name passed as the second argument
114085 ** to the sqlite3Fts3InitHashTable() function (e.g. 'fts3_tokenizer')
114241 ** Implementation of the scalar function fts3_tokenizer_internal_test().
114242 ** This function is used for testing only, it is not included in the
114245 ** The purpose of this is to test that the fts3_tokenizer() function
114252 ** function with no arguments. An assert() will fail if a problem is
114271 /* Test the query function */
114281 /* Test the storage function */
114301 ** This function adds a scalar function (see header comment above
114307 ** The third argument to this function, zName, is used as the name
114777 ** This function is used to obtain an SQLite prepared statement handle
114944 ** This function ensures that the caller has obtained a shared-cache
114999 ** This function also serves to allocate the PendingList structure itself.
115180 ** Calling this function indicates that subsequent calls to
115212 ** This function is called by the xUpdate() method as part of an INSERT
115235 ** This function is called by the xUpdate() method for an INSERT operation.
115368 ** This function allocates a new level iLevel index in the segdir table.
115419 ** This function reads data from a single row of the %_segments table. The
115431 ** This function may leave an open sqlite3_blob* handle in the
115433 ** to this function. The handle may be closed by calling the
115434 ** sqlite3Fts3SegmentsClose() function. Reusing a blob handle is a handy
115438 ** method (xFilter etc.) that may directly or indirectly call this function
115488 ** the sqlite3Fts3ReadBlock() function for details.
115648 ** This function is called to estimate the amount of data that will be
115793 ** This is a comparison function used as a qsort() callback when sorting
115812 ** This function is used to allocate an Fts3SegReader that iterates through
115890 ** The second argument to this function is expected to be a statement of
115901 ** This function allocates and initializes a Fts3SegReader structure to
115959 ** A different comparison function for SegReader structures. In this
116012 ** (according to the comparison function provided). This function shuffles
116019 int (*xCmp)(Fts3SegReader *, Fts3SegReader *) /* Comparison function */
116226 ** Helper function for fts3NodeWrite().
116243 ** database. Then call this function recursively to write the parent of
116318 ** be passed NULL. This function will allocate a new SegmentWriter object
116457 ** database. This function must be called after all terms have been added
116507 ** This function tests if there exist any documents with docid values that
116568 ** This function is used after merging multiple segments into a single large
116620 ** When this function is called, buffer *ppList (size *pnList bytes) contains
116622 ** function adjusts the pointer *ppList and the length *pnList so that they
116695 ** This function is used to iterate through a contiguous set of terms
116700 ** allocated with sqlite3Fts3SegReaderNew(). This function merges the range
116704 ** function xFunc is invoked with its arguments set as follows.
116706 ** arg 0: Copy of 'p' parameter passed to this function
116707 ** arg 1: Copy of 'pContext' parameter passed to this function
116713 ** The 4th argument to this function is a pointer to a structure of type
116716 ** modify the behaviour of this function. See comments above structure
116737 /* If there are zero segments, this function is a no-op. This scenario
116881 ** If this function is called with iLevel<0, but there is only one
117026 ** allocated by this function.
117228 ** This function assumes that sqlite3Fts3CacheDeferredDoclists() has already
117241 ** Helper fucntion for FreeDeferredDoclists(). This function removes all
117262 ** (allocated) by the sqlite3Fts3CacheDeferredDoclists() function.
117376 ** This function does the work for the xUpdate method of FTS3 virtual
117560 ** accumulating the data returned by the matchinfo() function.
117587 ** This function is used to help iterate through a position-list. A position
117601 ** When this function is called, *pp points to the start of an element of
117613 ** Helper function for fts3ExprIterate() (see below).
117618 int (*x)(Fts3Expr*,int,void*), /* Callback function to invoke for phrases */
117640 ** For each phrase node found, the supplied callback function is invoked.
117642 ** If the callback function returns anything other than SQLITE_OK,
117649 int (*x)(Fts3Expr*,int,void*), /* Callback function to invoke for phrases */
117657 ** The argument to this function is always a phrase node. Its doclist
117904 ** This function is an fts3ExprIterate() callback used by fts3BestSnippet().
118061 ** The fts3BestSnippet() function often selects snippets that end with a
118068 ** This function "shifts" the beginning of the snippet forward in the
118244 ** This function is used to count the entries in a column-list (a
118246 ** row). When this function is called, *ppCollist should point to the
118301 ** function populates Matchinfo.aMatchinfo[] as follows:
118525 ** This function implements the FTS3_MATCHINFO_LCS matchinfo() flag.
118610 ** be returned by the matchinfo() function. Argument zArg contains the
118728 const char *zArg /* Second argument to matchinfo() function */
118750 ** matchinfo function has been called for this query. In this case
118792 ** Implementation of snippet() function.
118795 sqlite3_context *pCtx, /* SQLite function call context */
118845 ** If the iCol argument to this function was negative, this means all
118910 ** This function is an fts3ExprIterate() callback used by sqlite3Fts3Offsets().
118938 ** Implementation of offsets() function.
118941 sqlite3_context *pCtx, /* SQLite function call context */
119074 ** Implementation of matchinfo() function.
119077 sqlite3_context *pContext, /* Function call context */
119079 const char *zArg /* Second arg to matchinfo() function */
119415 ** as the context for the user-function created by by s_r_g_c(). The object
119418 ** the geometry callback function).
119820 /* Forward declaration for the function that does the work of
119977 ** The r-tree constraint passed as the second argument to this function is
120060 ** This function assumes that the cell is part of a leaf node.
120301 ** This function is called to configure the RtreeConstraint object passed
120303 ** first argument to this function is the right-hand operand to the MATCH
120395 ** an sqlite3_rtree_geometry_callback() SQL user function.
120697 ** This function implements the ChooseLeaf algorithm from Gutman[84].
120790 ** the node pNode. This function updates the bounding box cells in
120843 ** Implementation of the linear variant of the PickNext() function from
120861 ** Implementation of the linear variant of the PickSeeds() function from
120923 ** Implementation of the quadratic variant of the PickNext() function from
120955 ** Implementation of the quadratic variant of the PickSeeds() function from
120994 ** (nIdx-1) in no particular order. This function sorts the values
121001 ** this function sets the aIdx array to contain:
121066 ** (nIdx-1) in no particular order. This function sorts the values
121451 ** function is called to determine its ancestry.
121613 ** relinquished before this function returns.
121978 0, /* xFindFunction - function overloading */
122055 ** The second argument to this function contains the text of an SQL statement
122077 ** This function is called from within the xConnect() or xCreate() method to
122082 ** If this function is being called as part of an xConnect(), then the rtree
122121 ** This function is the implementation of both the xConnect and xCreate
122217 ** Implementation of a scalar function that decodes r-tree nodes to
122220 ** The scalar function takes two arguments, a blob of data containing
122286 ** function "rtreenode".
122311 ** invocation of a geometry function, and as the destructor for the geometry
122320 ** scalar user function. This C function is the callback used for all such
122349 ** Register a new geometry function for use with the r-tree MATCH operator.
122357 RtreeGeomCallback *pGeomCtx; /* Context object for new user-function */
122365 /* Create the new user-function. Register a destructor function to delete
122405 ** * An implementation of the SQL regexp() function (and hence REGEXP
122440 ** Version of sqlite3_free() that is always a function, never a macro.
122530 ** Implementation of the like() SQL function. This function implements
122531 ** the build-in LIKE operator. The first argument to the function is the
122582 ** This function is called when an ICU function called from within
122583 ** the implementation of an SQL scalar function returns an error.
122585 ** The scalar function context passed as the first argument is
122589 sqlite3_context *pCtx, /* SQLite scalar function context */
122590 const char *zName, /* Name of ICU function that failed */
122591 UErrorCode e /* Error code returned by ICU function */
122600 ** Function to delete compiled regexp objects. Registered as
122601 ** a destructor function with sqlite3_set_auxdata().
122609 ** Implementation of SQLite REGEXP operator. This scalar function takes
122615 ** SQLite maps the regexp() function to the regexp() operator such
122674 ** pointer after this function returns.
122684 ** lower(). Function upper() converts its input to upper-case (ABC).
122685 ** Function lower() converts to lower-case (abc).
122749 ** Collation sequence destructor function. The pCtx argument points to
122758 ** Collation sequence comparison function. The pCtx argument points to
122781 ** Implementation of the scalar function icu_load_collation().
122783 ** This scalar function is used to add ICU collation based collation
122825 sqlite3_result_error(p, "Error registering collation function", -1);
122834 const char *zName; /* Function name */