Home | History | Annotate | Download | only in orig

Lines Matching refs:FUNCTION

220 ** presents to client programs.  If a C-function, structure, datatype,
344 ** macro. ^The sqlite3_libversion() function returns a pointer to the
346 ** function is provided for use in DLLs since DLL users usually do not have
348 ** sqlite3_libversion_number() function returns an integer equal to
349 ** [SQLITE_VERSION_NUMBER]. ^The sqlite3_sourceid() function returns
363 ** ^The sqlite3_compileoption_used() function returns 0 or 1
368 ** ^The sqlite3_compileoption_get() function allows iterating
390 ** ^The sqlite3_threadsafe() function returns zero if and only if
416 ** sqlite3_threadsafe() function shows only the compile-time setting of
524 ** The type for a callback function.
542 ** argument. ^If the callback function of the 3rd argument to
566 ** ^The 2nd argument to the sqlite3_exec() callback function is the
595 int (*callback)(void*,int,char**,char**), /* Callback function */
1121 ** to a function of type (int (*)(void *)). In order to invoke the connections
1122 ** busy-handler, this function should be invoked with the second (void *) in
1347 ** The xRandomness() function attempts to return nBytes bytes
1359 ** greater and the function pointer is not NULL) and will fall back
1672 void *(*xMalloc)(int); /* Memory allocation function */
1890 ** function with a call signature of void(*)(void*,int,const char*),
1891 ** and a pointer to void. ^If the function pointer is not NULL, it is
1893 ** function pointer is NULL, the [sqlite3_log()] interface becomes a no-op.
1896 ** function whenever that function is invoked. ^The second parameter to
1897 ** the logger function is a copy of the first parameter to the corresponding
1901 ** The SQLite logging interface is not reentrant; the logger function
1904 ** function must be threadsafe. </dd>
1943 ** be a pointer to a function of type void(*)(void*,sqlite3*,const char*, int).
2136 ** This function is accessible to SQL statements via the
2137 ** [last_insert_rowid() SQL function].
2141 ** function is running and thus changes the last insert [rowid],
2152 ** ^This function returns the number of rows modified, inserted or
2156 ** returned by this function.
2168 ** Things are more complicated if the sqlite3_changes() function is
2170 ** program uses the [changes() SQL function], or if some other callback
2171 ** function invokes sqlite3_changes() directly. Essentially:
2175 ** sqlite3_changes() function is saved. After the trigger program
2185 ** ^This means that if the changes() SQL function (or similar) is used
2193 ** [count_changes pragma], and the [changes() SQL function].
2205 ** ^This function returns the total number of rows inserted, modified or
2217 ** [count_changes pragma], and the [total_changes() SQL function].
2229 ** ^This function causes any pending database operation to abort and
2306 ** ^The sqlite3_busy_handler(D,X,P) routine sets a callback function X
2438 ** ^The sqlite3_get_table() function evaluates one or more
2447 ** function must not try to call [sqlite3_free()] directly. Only
2811 ** The [sqlite3_set_authorizer | authorizer callback function] must
2826 ** The [sqlite3_set_authorizer()] interface registers a callback function
2834 ** callback function will be parameters or NULL depending on which of these
2873 #define SQLITE_FUNCTION 31 /* NULL Function Name */
2885 ** ^The callback function registered by sqlite3_trace() is invoked at
2896 ** ^The callback function registered by sqlite3_profile() is invoked
2904 ** sqlite3_profile() function is considered experimental and is
2916 ** function X to be invoked periodically during long running calls to
2922 ** callback function X. ^The parameter N is the approximate number of
3380 ** <dd>The maximum number of arguments on a function.</dd>)^
3545 ** ^(For example, if an application defines a function "eval()" that
3627 ** CAPI3REF: SQL Function Context Object
3629 ** The context in which an SQL function executes is stored in an
3632 ** The application-defined SQL function implementation will pass this
3901 ** the statement, where N is the second function argument.
3971 ** interfaces [sqlite3_prepare()] or [sqlite3_prepare16()], this function
4276 ** ^The sqlite3_finalize() function is called to delete a [prepared statement].
4304 ** The sqlite3_reset() function is called to reset a [prepared statement]
4329 ** KEYWORDS: {function creation routines}
4330 ** KEYWORDS: {application-defined SQL function}
4334 ** ^These functions (collectively known as "function creation routines")
4338 ** the second parameter (the name of the function being created)
4343 ** function is to be added. ^If an application uses more than one database
4347 ** ^The second parameter is the name of the SQL function to be created or
4351 ** ^Any attempt to create a function with a longer name
4355 ** is the number of arguments that the SQL function or
4356 ** aggregate takes. ^If this parameter is -1, then the SQL function or
4363 ** [SQLITE_UTF8 | text encoding] this SQL function prefers for
4365 ** [SQLITE_UTF16LE] if the function implementation invokes
4369 ** otherwise. ^The same SQL function may be registered multiple times using
4372 ** ^When multiple implementations of the same function are available, SQLite
4376 ** to signal that the function will always return the same result given
4378 ** deterministic. The built-in [random()] SQL function is an example of a
4379 ** function that is not deterministic. The SQLite query planner is able to
4384 ** function can gain access to this pointer using [sqlite3_user_data()].)^
4387 ** pointers to C-language functions that implement the SQL function or
4388 ** aggregate. ^A scalar SQL function requires an implementation of the xFunc
4390 ** parameters. ^An aggregate SQL function requires an implementation of xStep
4392 ** SQL function or aggregate, pass NULL pointers for all three function
4397 ** The destructor is invoked when the function is deleted, either by being
4409 ** SQL function is used. ^A function implementation with a non-negative
4410 ** nArg parameter is a better match than a function implementation with
4411 ** a negative nArg. ^A function where the preferred text encoding
4413 ** match than a function where the encoding is different.
4414 ** ^A function where the encoding difference is between UTF16le and UTF16be
4415 ** is a closer match than a function where the encoding difference is
4420 ** ^An application-defined function is permitted to call other
4423 ** statement in which the function is running.
4471 ** CAPI3REF: Function Flags
4501 ** CAPI3REF: Obtaining SQL Function Parameter Values
4506 ** the function or aggregate.
4513 ** each parameter to the SQL function. These routines are used to
4544 ** the SQL function that supplied the [sqlite3_value*] parameters.
4560 ** CAPI3REF: Obtain Aggregate Function Context
4567 ** for a particular aggregate function, SQLite
4570 ** sqlite3_aggregate_context() for the same aggregate function instance,
4574 ** an aggregate query, the xStep() callback of the aggregate function
4586 ** the same aggregate function instance will not resize the memory
4595 ** [sqlite3_context | SQL function context] that is the first parameter
4597 ** function.
4600 ** the aggregate SQL function is running.
4612 ** registered the application defined function.
4615 ** the application-defined function is running.
4627 ** registered the application defined function.
4632 ** CAPI3REF: Function Auxiliary Data
4637 ** multiple invocations of the same SQL function during query execution, under
4640 ** function. The compiled version of the regular expression can be stored as
4644 ** invocations of the same function.
4647 ** associated by the sqlite3_set_auxdata() function with the Nth argument
4648 ** value to the application-defined function. ^If there is no metadata
4649 ** associated with the function argument, this sqlite3_get_auxdata() interface
4653 ** argument of the application-defined function. ^Subsequent
4658 ** SQLite will invoke the destructor function X with parameter P exactly
4661 ** <li> when the corresponding function parameter changes, or
4671 function implementation and the
4672 ** function implementation should not make any use of P after
4675 ** ^(In practice, metadata is preserved between function calls for
4676 ** function parameters that are compile-time constants, including literal
4680 ** the SQL function is running.
4705 ** CAPI3REF: Setting The Result Of An SQL Function
4718 ** an application-defined function to be the BLOB whose content is pointed
4723 ** the application-defined function to be a BLOB containing all zero
4727 ** an application-defined function to be a floating point value specified
4731 ** cause the implemented SQL function to throw an exception.
4745 ** they return. Hence, the calling function can deallocate or
4747 ** ^The sqlite3_result_error_code() function changes the error code
4748 ** returned by SQLite as a result of an error in a function. ^By default,
4759 ** of the application-defined function to be the 32-bit signed integer
4762 ** of the application-defined function to be the 64-bit signed integer
4766 ** of the application-defined function to be NULL.
4770 ** set the return value of the application-defined function to be
4774 ** application-defined function to be a text string in an encoding
4785 ** function result. If the 3rd parameter is non-negative, then it
4793 ** function as the destructor on the text or BLOB result when it has
4806 ** the application-defined function to be a copy the
4816 ** than the one containing the application-defined function that received
4862 ** to the collating function callback, xCallback.
4869 ** through as the first argument to the collating function callback.
4871 ** ^The fifth argument, xCallback, is a pointer to the collating function.
4874 ** function requires the least amount of data transformation.
4875 ** ^If the xCallback argument is NULL then the collating function is
4879 ** ^The collating function callback is invoked with a copy of the pArg
4881 ** by the eTextRep argument. The collating function must return an
4884 ** respectively. A collating function must always return the same answer
4888 ** The collating function must obey the following properties for all
4898 ** If a collating function fails any of the above constraints and that
4899 ** collating function is registered and used, then the behavior of SQLite
4904 ** the collating function is deleted.
4910 ** sqlite3_create_collation_v2() function fails. Applications that invoke
4948 ** can be used, a single callback function may be registered with the
4952 ** ^If the function is registered using the sqlite3_collation_needed() API,
4956 ** ^A call to either function replaces the existing collation-needed callback.
4963 ** sequence function required. The fourth parameter is the name of the
4966 ** The callback function should register the desired collation using
5039 ** The sqlite3_sleep() function causes the current thread to suspend execution
5166 ** an error is to use this function.
5197 ** ^The filename returned by this function is the output of the
5235 ** function to be invoked whenever a transaction is [COMMIT | committed].
5239 ** function to be invoked whenever a transaction is [ROLLBACK | rolled back].
5243 ** ^If the callback on a commit hook function returns non-zero,
5247 ** return the P argument from the previous call of the same function
5249 ** the first call for each function on D.
5261 ** ^Registering a NULL function disables the callback.
5284 ** ^The sqlite3_update_hook() interface registers a callback function
5288 ** ^Any callback set by a previous call to this function
5291 ** ^The second argument is a pointer to the function to invoke when a
5321 ** ^The sqlite3_update_hook(D,C,P) function
5482 ** this function. ^(The second parameter is either the name of the database
5488 ** ^The third and fourth parameters to this function are the table and column
5492 ** and subsequent parameters to this function. ^Any of these arguments may be
5509 ** call to any SQLite API function.
5528 ** ^This function causes all database schemas to be read from disk and
5570 ** obtained from [sqlite3_malloc()]. The calling function
5577 ** See also the [load_extension() SQL function].
5605 ** ^This interface causes the xEntryPoint() function to be invoked for
5610 ** ^(Even though the function prototype shows that xEntryPoint() takes
5855 ** invoke the destructor function (if it is not NULL) when SQLite
5873 void(*xDestroy)(void*) /* Module destructor function */
5934 ** CAPI3REF: Overload A Function For A Virtual Table
5942 ** ^(This API makes sure a global version of a function with a particular
5943 ** name and number of parameters exists. If no such function exists
5944 ** before this API is called, a new function is created.)^ ^The implementation
5945 ** of the new function always causes an exception to be thrown. So
5946 ** the new function is not good for anything by itself. Its only
5947 ** purpose is to be a placeholder function that can be overloaded
6003 ** on *ppBlob after this function it returns.
6005 ** This function fails with SQLITE_ERROR if any of the following are true:
6021 ** ^Unless it returns SQLITE_MISUSE, this function sets the
6043 ** and the built-in [zeroblob] SQL function may be used to create a
6063 ** ^This function is used to move an existing blob handle so that it points
6080 ** ^This function sets the database handle error code and message.
6088 ** ^This function closes an open [BLOB handle]. ^(The BLOB handle is closed
6098 ** Calling this function with an argument that is not a NULL pointer or an
6101 ** [sqlite3_blob_open()]) is a harmless no-op. ^Otherwise, if this function
6127 ** ^(This function is used to read data from an open [BLOB handle] into a
6156 ** ^(This function is used to write data into an open [BLOB handle] from a
6162 ** ^Unless SQLITE_MISUSE is returned, this function sets the
6168 ** this function returns [SQLITE_READONLY].
6170 ** This function may only modify the contents of the BLOB; it is
6256 ** [SQLITE_CONFIG_MUTEX] option of the sqlite3_config() function
6258 ** function that calls sqlite3_initialize().
6361 ** part of system initialization by the sqlite3_initialize() function.
6366 ** part of system shutdown by the sqlite3_shutdown() function. The
6541 ** Unlike most of the SQLite API, this function is not guaranteed to
7207 ** ^Function sqlite3_backup_step(B,N) will copy up to N pages between
7211 ** are still more pages to be copied, then the function returns [SQLITE_OK].
7230 ** the [sqlite3_busy_handler | busy-handler function]
7402 ** However, the signature of the callback function allows SQLite to pass
7410 ** same callback function, then instead of invoking the callback function
7459 void (*xNotify)(void **apArg, int nArg), /* Callback function to invoke */
7482 ** SQL dialect used by SQLite. ^The sqlite3_strglob(P,X) function is case
7517 ** ^The [sqlite3_wal_hook()] function is used to register a callback that
7524 ** ^The first parameter passed to the callback function when it is invoked
7532 ** The callback function should normally return [SQLITE_OK]. ^If an error
7565 ** ^The callback registered by this function replaces any existing callback
7568 ** configured by this function.
7651 ** log file (including any that were already checkpointed before the function
7723 ** This function may be called by either the [xConnect] or [xCreate] method
7731 ** this function. (See [SQLITE_VTAB_CONSTRAINT_SUPPORT].) Further options
7767 ** [sqlite3_vtab_on_conflict()] function indicates that the current ON
7780 ** This function may only be called from within a call to the [xUpdate] method
7886 ** where there exist loops with no available statistics, this function behaves
7978 sqlite3_rtree_dbl *aParam; /* Parameters passed to SQL geom function */
8008 void *pContext; /* pContext from when function registered */
8009 int nParam; /* Number of function parameters */
8010 sqlite3_rtree_dbl *aParam; /* value of function parameters */
8012 void (*xDelUser)(void*); /* function to free pUser */
8146 ** The maximum number of arguments to an SQL function.
8317 ** A macro to hint to the compiler that a function should not be
8526 ** Is the sqlite3ErrName() function needed in the build? Currently,
9269 ** make it clear to human readers when a function parameter is deliberately
9270 ** left unused within the body of a function. This usually happens when
9271 ** a function is called via a function pointer. For example the
9276 ** When a function parameter is not used at all within the body of a function,
9514 struct KeyInfo*, /* First argument to compare function */
9713 ** A smaller version of VdbeOp used for the VdbeAddOpList() function because
10164 ** roll back. See comments for function writeMasterJournal() in pager.c
10722 ** Wrapper around OS specific sqlite3_os_init() function.
10966 ** A hash table for function definitions.
11003 ** typedef for the authorization callback function.
11060 void (*xTrace)(void*,const char*); /* Trace function */
11061 void *pTraceArg; /* Argument to the trace function */
11062 void (*xProfile)(void*,const char*,u64); /* Profiling function */
11063 void *pProfileArg; /* Argument to profile function */
11084 sqlite3_xauth xAuth; /* Access authorization function */
11085 void *pAuthArg; /* 1st argument to the access auth function */
11223 ** Each SQL function is defined by an instance of the following
11232 FuncDef *pNext; /* Next function with same name */
11233 void (*xFunc)(sqlite3_context*,int,sqlite3_value**); /* Regular function */
11236 char *zName; /* SQL name of the function. */
11238 FuncDestructor *pDestructor; /* Reference counted destructor function */
11242 ** This structure encapsulates a user-function destructor callback (as
11244 ** create_function_v2() is called to create a function with a destructor,
11268 #define SQLITE_FUNC_CASE 0x008 /* Case-sensitive LIKE-type function */
11271 #define SQLITE_FUNC_LENGTH 0x040 /* Built-in length() function */
11272 #define SQLITE_FUNC_TYPEOF 0x080 /* Built-in typeof() function */
11275 #define SQLITE_FUNC_UNLIKELY 0x400 /* Built-in unlikely() function */
11280 ** The following three macros, FUNCTION(), LIKEFUNC() and AGGREGATE() are
11283 ** FUNCTION(zName, nArg, iArg, bNC, xFunc)
11284 ** Used to create a scalar function definition of a function zName
11285 ** implemented by C function xFunc that accepts nArg arguments. The
11287 ** as the user-data (sqlite3_user_data()) for the function. If
11291 ** Like FUNCTION except it omits the SQLITE_FUNC_CONSTANT flag.
11294 ** Used to create an aggregate function definition implemented by
11297 ** FUNCTION().
11300 ** Used to create a scalar function definition of a function zName
11302 ** function likeFunc. Argument pArg is cast to a (void *) and made
11303 ** available as the function user-data (sqlite3_user_data()). The
11307 #define FUNCTION(zName, nArg, iArg, bNC, xFunc) \
11360 void (*xDestroy)(void *); /* Module destructor function */
11483 ** Refer to comments above function sqlite3VtabUnlockList() for an
11837 struct AggInfo_func { /* For each aggregate function */
11838 Expr *pExpr; /* Expression encoding the function */
11839 FuncDef *pFunc; /* The aggregate function implementation */
11875 ** variable name. Finally, if the expression is an SQL function (TK_FUNCTION),
11876 ** then Expr.token contains the name of the function.
11881 ** Expr.x.pList is a list of arguments if the expression is an SQL function,
11942 ExprList *pList; /* op = IN, EXISTS, SELECT, CASE, FUNCTION, BETWEEN */
11976 #define EP_Distinct 0x000010 /* Aggregate function with DISTINCT keyword */
11979 #define EP_InfixFunc 0x000080 /* True for an infix function: LIKE, GLOB, etc */
11990 #define EP_Unlikely 0x040000 /* unlikely() or likelihood() function */
11991 #define EP_ConstFunc 0x080000 /* Node is a SQLITE_FUNC_CONSTANT function */
12029 ** Flags passed to the sqlite3ExprDup() function. See the header comment
12039 ** also be used as the argument to a function, in which case the a.zName
12496 ** compiled. Function sqlite3TableLock() is used to add entries to the
12543 int nMaxArg; /* Max args passed to user function by sub-program */
12812 void (*xLog)(void*,int,const char*); /* Function for logging */
12977 ** Internal function prototypes
13056 ** functions arguments that are the parameters to the printf() function.
13869 ** Standard function tolower() is implemented using the sqlite3UpperToLower[]
14724 #define MEM_Agg 0x2000 /* Mem.z points to an agg function context */
14746 ** Each auxiliary data pointer stored by a user defined function
14754 int iArg; /* Index of function argument. */
14761 ** The "context" argument for an installable function. A pointer to an
14775 FuncDef *pFunc; /* Pointer to function information */
14779 int isError; /* Error code returned by the function. */
14822 Mem **apArg; /* Arguments to currently executing user function */
14893 ** Function prototypes
15340 ** There is only one exported symbol in this file - the function
15406 ** The function returns the number of successful conversions.
15728 ** On recent Windows platforms, the localtime_s() function is available
15756 ** library function localtime_r() is used to assist in the calculation of
15813 /* EVIDENCE-OF: R-55269-29598 The localtime_r() C function normally only
16074 ** Process time function arguments. argv[0] is a date-time stamp.
16348 ** This function returns the same value as time('now').
16362 ** This function returns the same value as date('now').
16376 ** This function returns the same value as datetime('now').
16396 ** This function uses the C-library functions time(), gmtime()
16398 ** as the user-data for the function.
16435 ** This function registered all of the above C functions as SQL
16442 FUNCTION(julianday, -1, 0, 0, juliandayFunc ),
16443 FUNCTION(date, -1, 0, 0, dateFunc ),
16444 FUNCTION(time, -1, 0, 0, timeFunc ),
16445 FUNCTION(datetime, -1, 0, 0, datetimeFunc ),
16446 FUNCTION(strftime, -1, 0, 0, strftimeFunc ),
16447 FUNCTION(current_time, 0, 0, 0, ctimeFunc ),
16448 FUNCTION(current_timestamp, 0, 0, 0, ctimestampFunc),
16449 FUNCTION(current_date, 0, 0, 0, cdateFunc ),
16490 ** function returning SQLITE_IOERR_NOMEM using the DO_OS_MALLOC_TEST macro.
16712 ** (if iVersion is 2 or greater and the function pointer is not NULL) and
16755 ** This function is a wrapper around the OS specific implementation of
16885 ** hash table will continue to function normally. So a malloc failure
16992 ** Populate the low-level memory allocation function pointers in
17090 ** The malloc.h header file is needed for malloc_usable_size() function
17099 ** -DSQLITE_WITHOUT_MSIZE. Using the _msize() function also requires
17109 ** SQLITE_MALLOCSIZE to the appropriate function name, which is _msize()
17111 ** The memory size function can always be overridden manually by defining
17112 ** the macro SQLITE_MALLOCSIZE to the desired function name.
17289 ** Populate the low-level memory allocation function pointers in
17669 ** Populate the low-level memory allocation function pointers in
18189 ** This function assumes that the necessary mutexes, if any, are
18271 ** This function assumes that the necessary mutexes, if any, are
18504 ** Populate the low-level memory allocation function pointers in
19238 ** this function is a no-op.
19987 ** stub function. You will lose timing support for many
20138 ** For WinCE, some API function parameters do not appear to be declared as
21317 ** This function must be called before exiting any API function (i.e.
21322 ** function. However, if a malloc() failure has occurred since the previous
21460 ** output: *val = 1.4159 function return = '3'
22082 } /* End of function */
23237 ** changed by this function.
23294 /* This test function is not currently used by the automated test-suite.
23327 ** be freed by the calling function.
23373 ** This routine is called from the TCL test function "translate_selftest".
23482 ** Use the math library isnan() function if compiled with SQLITE_HAVE_ISNAN.
23489 ** Systems that support the isnan() library function should probably
23491 ** found that many systems do not have a working isnan() function so
23595 ** This function should be used to report any error that occurs while
23597 ** last thing the sqlite3_prepare() function does is copy the error
23598 ** stored by this function into the database handle using sqlite3Error().
24370 ** this function assumes the single-byte case has already been handled.
24578 ** dereferenced for any reason. The calling function should invoke
24856 ** The hashing function.
24941 /* This function (for internal use only) locates an element in an
25035 ** If the "data" parameter to this function is NULL, then the
25084 /* 1 */ "Function" OpHelp("r[P3]=func(r[P2@P5])"),
25634 ** stub function. You will lose timing support for many
25762 ** The difference is important when using a pointer to the function.
26067 ** Function unixMutexHeld() is used to assert() that the global mutex
26068 ** is held when required. This function is only used as part of assert()
26090 ** Helper function for printing out trace information from debugging
26202 ** should never be hit, as this function should only be called after
26203 ** a locking-related function (i.e. fcntl()) has returned non-zero with
26543 ** This function - unixLogError_x(), is only ever called via the macro
26546 ** It is invoked after an error occurs in an OS function and errno has been
26553 ** The two subsequent arguments should be the name of the OS function that
26560 const char *zFunc, /* Name of OS function that failed */
26568 ** the strerror() function to obtain the human-readable error message
26656 ** The mutex entered using the unixEnterMutex() function must be held
26657 ** when this function is called.
26688 ** The mutex entered using the unixEnterMutex() function must be held
26689 ** when this function is called.
26886 ** This function is a pass-through to fcntl(F_SETLK) if pFile is using
27370 ** This function performs the parts of the "close file" operation
29143 ** This function is called to handle the SQLITE_FCNTL_SIZE_HINT
29331 ** SQLite code assumes this function cannot fail. It also assumes that
29454 ** This function should not be called directly by other code in this file.
29645 ** This is not a VFS shared-memory method; it is a utility function called
29837 ** This function is called to obtain a pointer to region iRegion of the
29848 ** been allocated, it is allocated by this function.
30189 ** If successful, this function sets the following variables:
30278 ** outstanding xFetch() references to it, this function is a no-op.
30330 ** If this function does return a pointer, the caller must eventually
30355 ** If the third argument is non-NULL, then this function releases a
30357 ** argument passed to this function must be the same as the corresponding
30360 ** Or, if the third argument is NULL, then this function is being called
30401 ** of "finder" functions. A finder-function is used to locate the appropriate
30404 ** the correct finder-function for that VFS.
30407 ** object. The only interesting finder-function is autolockIoFinder, which
30411 ** For finder-function F, two objects are created:
30413 ** (1) The real finder-function named "FImpt()".
30415 ** (2) A constant pointer to this function named just "F".
30420 ** directly at the finder-function since C90 rules prevent a void*
30421 ** from be cast into a function pointer.
30429 ** * An I/O method finder function called FINDER that returns a pointer
30467 posixIoFinder, /* Finder function name */
30477 nolockIoFinder, /* Finder function name */
30487 dotlockIoFinder, /* Finder function name */
30499 flockIoFinder, /* Finder function name */
30512 semIoFinder, /* Finder function name */
30525 afpIoFinder, /* Finder function name */
30542 ** to go ahead and define the sqlite3_io_methods and finder function
30551 proxyIoFinder, /* Finder function name */
30565 nfsIoFinder, /* Finder function name */
30578 ** This "finder" function attempts to determine the best locking strategy
30644 ** This "finder" function for VxWorks checks to see if posix advisory
30679 ** An abstract type for a pointer to an IO method finder function:
30923 ** function failing.
30963 ** argument to this function.
30968 ** Refer to comments in the unixClose() function and the lengthy comment
31018 ** This function is called by unixOpen() to determine the unix permissions
31028 ** this function queries the file-system for the permissions on the
31127 int rc = SQLITE_OK; /* Function Return Code */
31142 /* If creating a master or main-file journal, this function will open
31152 /* If argument zPath is a NULL pointer, this function is required to open
31228 /* Determine the value of the flags parameter passed to POSIX function
31476 ** function failing. This function could fail if, for example, the
31511 ** SQLite calls this function immediately after a call to unixDlSym() or
31530 ** cast into a pointer to a function. And yet the library dlsym() routine
31531 ** returns a void* which is really a pointer to a function. So how do we
31534 ** Variable x below is defined to be a pointer to a function taking
31535 ** parameters void* and const char* and returning a pointer to a function.
31536 ** We initialize x by assigning it a pointer to the dlsym() function.
31537 ** (That assignment requires a cast.) Then we call the function that
31541 ** you really cannot cast a function pointer into void*. But then, on the
32910 ** to the "finder" function. (pAppData is a pointer to a pointer because
32911 ** silly C90 rules prohibit a void* from being cast to a function pointer
32916 ** finder-function. The finder-function returns a pointer to the
33153 ** stub function. You will lose timing support for many
33528 * winMemShutdown function is called (e.g. by the sqlite3_shutdown
33529 * function), all data that was allocated using the isolated heap will
33639 ** This function is not available on Windows CE or WinRT.
34264 ** NOTE: On some sub-platforms, the InterlockedCompareExchange "function"
34392 ** If a Win32 native heap has been configured, this function will attempt to
34433 ** If a Win32 native heap has been configured, this function will attempt to
34435 ** the sqlite3_memory_used() function does not return zero, SQLITE_BUSY will
34451 ** being held by us, no other function (i.e. from another thread) should
34479 ** This function outputs the specified (ANSI) string to the Win32 debugger
34569 ** This function determines if the machine is running a version of Windows
34786 ** Populate the low-level memory allocation function pointers in
34957 ** This function sets the data directory or the temporary directory based on
35075 ** This function - winLogErrorAtLine() - is only ever called via the macro
35078 ** This routine is invoked after an error occurs in an OS function.
35085 ** The two subsequent arguments should be the name of the OS function that
35092 const char *zFunc, /* Name of OS function that failed */
35203 ** The MSVC CRT on Windows CE may not have a localtime() function. So
35905 int rc = SQLITE_OK; /* Return code for this function */
36100 ** When the LockFile function was used, it was always expected to fail
36102 ** obtain an exclusive lock. These flags are used with the LockFileEx function
36111 ** Currently, SQLite never calls the LockFileEx function without wanting the
36552 ** SQLite code assumes this function cannot fail. It also assumes that
36586 ** Function winShmMutexHeld() is used to assert() that the global mutex
36587 ** is held when required. This function is only used as part of assert()
36738 ** This is not a VFS shared-memory method; it is a utility function called
37061 ** This function is called to obtain a pointer to region iRegion of the
37072 ** been allocated, it is allocated by this function.
37257 ** outstanding xFetch() references to it, this function is a no-op.
37363 ** If this function does return a pointer, the caller must eventually
37398 ** If the third argument is non-NULL, then this function releases a
37400 ** argument passed to this function must be the same as the corresponding
37403 ** Or, if the third argument is NULL, then this function is being called
37483 ** obtained from malloc and must be freed by the calling function.
37504 ** function.
37521 ** This function returns non-zero if the specified UTF-8 string buffer
37557 ** function failing.
37824 /* If argument zPath is a NULL pointer, this function is required to open
37829 int rc = SQLITE_OK; /* Function Return Code */
37888 /* If the second argument to this function is NULL, generate a
38288 ** non-zero is returned from this function, the calling function must simply
38290 ** using the GetFullPathName Win32 API function (if available).
38300 ** so that callers of this function will simply use it verbatim.
38308 ** relative path or an absolute path. Callers of this function must not
38425 ** function failing. This function could fail if, for example, the
38720 ** The idea is that this function works like a combination of
38723 ** function, SQLite calls this function with zBuf pointing to
38907 /* Hashing function for the aHash representation.
38909 ** (an arbitrary prime)in the hash function provided
39005 ** The calling function must ensure that p is a valid Bitvec object
39358 ** being used for an in-memory database, this function is a no-op.
39441 ** are no outstanding page references when this function is called.
39569 ** This routine is broken out into a separate function since it
39649 ** page. This function deletes that reference, so after it returns the
39732 ** function is 0, then the data area associated with page 1 is zeroed, but
40083 ** This function is called during initialization if a static buffer is
40112 ** Malloc function used within this file to allocate space from the buffer
40114 ** such buffer exists or there is no space left in it, this function falls
40263 ** Malloc function used by SQLite to obtain space from the buffer configured
40265 ** exists, this function falls back to sqlite3Malloc().
40307 ** This function is used to resize the hash table used by the cache passed
40310 ** The PCache mutex must be held when this function is called.
40347 ** This function is used internally to remove the page pPage from the
40349 ** LRU list, then this function is a no-op.
40351 ** The PGroup mutex must be held when this function is called.
40385 ** The PGroup mutex must be held when this function is called.
40421 ** The PCache mutex must be held when this function is called.
40685 ** Whether or not a new page may be allocated by this function depends on
40692 ** the calling function (pcache.c) will never have a createFlag of 1 on
40784 /* It is an error to call this function if the page is already
40887 ** This function is called during initialization (sqlite3_initialize()) to
40925 ** This function is called to free superfluous dynamically allocated memory
40930 ** been released, the function returns. The return value is the total number
40958 ** This function is used by test procedures to inspect the internal state
41528 ** the implementation of each function in log.c for further details.
41615 int (*xBusy)(void*), /* Function to call when busy */
41787 ** List of state transitions and the C [function] that performs each:
41942 ** function sqlite3PagerRollback().
41945 ** following a commit in function sqlite3PagerCommitPhaseTwo().
41948 ** database file in function pagerStress() in order to free up
42031 ** lock on the database file before attempting to roll it back. See function
42317 int (*xBusyHandler)(void*); /* Function to call when busy */
42465 ** This function runs many asserts to try to find inconsistencies in
42715 ** Except, if Pager.eLock is set to UNKNOWN_LOCK when this function is
42741 ** Except, if Pager.eLock is set to UNKNOWN_LOCK when this function is
42761 ** This function determines whether or not the atomic-write optimization
42770 ** an error to call this function if pPager is opened on an in-memory
42803 ** on the cache using a hash function. This is used for testing
42846 ** This function attempts to read a master journal file name from the
42936 ** The journal file must be open when this function is called.
42938 ** This function is a no-op if the journal file has not been written to
43110 ** pPager->journalOff. See comments above function writeJournalHdr() for
43369 ** This function is a no-op if the pager is in exclusive mode and not
43378 ** If the pager is in ERROR state when this function is called, the
43460 ** This function is called whenever an IOERR or FULL error that requires
43463 ** the error-code about to be returned by a pager API function. The
43464 ** value returned is a copy of the second argument to this function.
43553 ** or at least a RESERVED lock. This function may be called when there
43562 ** read-transaction, this function is called with eState==PAGER_READER
43780 ** allocated by this function. If this is the case and an allocation fails,
44012 function.
44025 ** This function reads the contents of the master-journal file into
44034 ** above, this function returns without doing anything. Otherwise, if
44038 ** If an IO error within this function, an error code is returned. This
44039 ** function allocates memory by calling sqlite3Malloc(). If an allocation
44043 ** TODO: This function allocates a single block of memory to load
44139 ** This function is used to change the actual size of the database
44144 ** DBMOD or OPEN state, this function is a no-op. Otherwise, the size
44501 ** file before this function is called.
44587 ** This function is invoked once for each page that has already been
44635 ** This function is called to rollback a transaction on a WAL database.
44661 ** This function is a wrapper around sqlite3WalFrames(). As well as logging
44663 ** this function notifies any active backup processes that the pages have
44761 ** This function is called as part of the transition from PAGER_OPEN
44773 ** function returns zero if the WAL is not open (i.e. Pager.pWal==0), or
44826 ** function. Because an EXCLUSIVE lock on the db file is required to delete
44968 ** pager_playback() function for additional information.
45168 ** Set the busy handler function.
45186 ** returned to the caller of the pager API function.
45190 int (*xBusyHandler)(void *), /* Pointer to busy-handler function */
45208 ** If the pager is in the error state when this function is called, it
45224 ** If the page size is changed, then this function uses sqlite3PagerMalloc()
45231 ** function was called, or because the memory allocation attempt failed,
45238 ** function may be called from within PagerOpen(), before the state
45241 ** At one point this function returned an error if the pager was in
45243 ** there is at least one outstanding page reference, this function
45348 ** function is used to read database headers, and a new transient or
45377 ** This function may only be called when a read-transaction is open on
45392 ** a similar or greater lock is already held, this function is a no-op
45424 ** Function assertTruncateConstraint(pPager) checks that one of the
45432 ** (as determined by function subjRequiresPage()).
45434 ** If the condition asserted by this function were not true, and the
45459 ** function does not actually modify the database file on disk. It
45463 ** This function is only called right before committing a transaction.
45464 ** Once this function has been called, the transaction must either be
45465 ** rolled back or committed. It is not safe to call this function and
45477 ** back. This is no longer necessary as this function is now only
45486 ** This function is called before attempting a hot-journal rollback. It
45517 ** Page references obtained by calling this function should be released
45591 ** with this page cache after this function returns will likely
45594 ** This function always succeeds. If a transaction is active an attempt
45673 ** If the Pager.noSync flag is set, then this function is a no-op.
45816 ** by the PgHdr.pDirty pointer. This function writes each one of the
45818 ** be NULL, representing an empty list. In this case this function is
45821 ** The pager must hold at least a RESERVED lock when this function
45849 /* This function is only called for rollback pagers in WRITER_DBMOD state. */
45931 ** function is a no-op.
45952 ** that it is really required before calling this function.
45957 ** This function returns SQLITE_OK if everything is successful, an IO
46001 ** This function is called by the pcache layer when it has reached some
46009 ** The job of this function is to make pPg clean by writing its contents
46147 ** and error code returned. This function may return SQLITE_NOMEM
46158 void (*xReinit)(DbPage*) /* Function to reinitialize pages */
46473 ** This function is called after transitioning from PAGER_UNLOCK to
46476 ** needs to be played back. According to this function, a hot-journal
46596 ** This function is called to obtain a shared lock on the database file.
46597 ** It is illegal to call sqlite3PagerAcquire() until after this function
46599 ** this function is called, it is a no-op.
46601 ** The following operations are also performed by this function.
46674 ** downgraded to SHARED_LOCK before this function returns.
46692 ** function was called and the journal file does not exist.
46807 ** mode. Otherwise, the following function call is a no-op.
46862 ** already in the cache when this function is called, then the extra
46981 ** pager was already in the error-state when this function was called.
47106 ** This function is called at the start of every write transaction.
47112 ** as well. This function is only used when the journal file is being
47117 ** then this function just writes a journal header to the start of the
47120 ** Whether or not the journal file is opened by this function, the
47135 /* If already in the error state, this function is a no-op. But on
47201 ** write-transaction has already been opened, this function is a no-op.
47438 ** this function.
47509 ** of this function and be careful not to change any page data unless
47512 ** The difference between this function and pager_write() is that this
47513 ** function also deals with the special case where 2 or more pages
47587 ** sqlite3OsWrite() function.
47600 ** to this function. Otherwise, it is always set to zero.
47624 /* If page one was fetched successfully, and this function is not
47670 ** function returns SQLITE_OK. Otherwise, an IO error code is returned.
47688 ** This function may only be called while a write-transaction is active in
47762 ** function has already been called, it is mostly a no-op. However, any
47797 ** pager_incr_changecounter() function is called to update the change
47896 ** When this function is called, the database file has been completely
47902 ** This function finalizes the journal file, either by deleting,
47926 ** using persistent journals, then this function is a no-op.
47956 ** If the pager is already in PAGER_ERROR state when this function is called,
47959 ** Otherwise, in rollback mode, this function performs two functions:
48111 ** equal to nSavepoint, then this function is a no-op.
48167 ** This function is called to rollback or release (commit) a savepoint.
48180 ** (Pager.nSavepoint-1), then this function is a no-op.
48182 ** If a negative value is passed to this function, then the current
48184 ** sqlite3PagerRollback() because this function does not terminate
48192 ** This function may return SQLITE_NOMEM if a memory allocation fails,
48311 ** This function is called by the wal module when writing page content
48314 ** This function returns a pointer to a buffer containing the encrypted
48315 ** page content. If a malloc fails, this function may return NULL.
48354 ** This function may return SQLITE_NOMEM or an IO error code if an error
48392 ** one or more savepoint bitvecs. This is the reason this function
48488 ** with a page number other than iNew. This function changes the page's
48706 ** This function is called when the user invokes "PRAGMA wal_checkpoint",
48758 function is called, take an EXCLUSIVE
48794 ** this function.
48838 ** This function is called to close the connection to the log file prior
48841 ** Before closing the log file, this function attempts to take an
48887 ** A read-lock must be held on the pager when this function is called. If
49559 ** This function encodes a single frame header and writes it to a buffer
49714 ** between 0 and (HASHTABLE_NSLOT-1). The walHashNext() function advances
49804 ** This function is called whenever pWal->hdr.mxFrame is decreased due
49974 ** this function returns.
50146 ** A SHARED lock should be held on the database file when this function
50271 ** This function merges two sorted lists into a single sorted list.
50453 ** of memory will be freed before this function returns.
50504 ** busy-handler function. Invoke it and retry the lock until either the
50509 int (*xBusy)(void*), /* Function to call when busy */
50522 ** The cache of the wal-index header must be valid to call this function.
50530 ** The following is guaranteed when this function is called:
50538 ** This function updates the shared-memory structures so that the next
50595 int (*xBusy)(void*), /* Function to call when busy */
51393 ** This function starts a write transaction on the WAL.
51453 ** function moves the write-pointer back to the start of the transaction.
51455 ** Additionally, the callback function is invoked for each frame written
51460 ** Otherwise, if the callback function does not return an error, this
51461 ** function returns SQLITE_OK.
51499 ** values. This function populates the array with values required to
51543 ** This function is called just before writing a set of frames to the log
51859 ** callback. In this case this function runs a blocking checkpoint.
51864 int (*xBusy)(void*), /* Function to call when busy */
51979 ** This function is called to change the WAL subsystem into or out
52051 ** read-lock. This function returns the database page-size if it is known,
52541 ** about a cell. The parseCellPtr() function fills in this structure
52588 struct KeyInfo *pKeyInfo; /* Argument passed to comparison function */
52847 /* This is a helper function for sqlite3BtreeLock(). By moving
53170 **** This function is only used as part of an assert() statement. ***
53185 ** function has to search through the database schema.
53261 **** This function may be used as part of assert() statements only. ****
53358 ** This function assumes the following:
53380 ** obtain a read-lock using this function. The only read-lock obtained
53385 /* This function should only be called on a sharable b-tree after it
53430 ** This function assumes that Btree p has an open read or write
53462 /* This function is called when Btree p is concluding its
53476 ** This function changes all write-locks held by Btree p into read-locks.
53526 ** This function is called before modifying the contents of a table
53556 /* Stub function when INCRBLOB is omitted */
53613 ** This function is called when a free-list leaf page is removed from the
54035 ** are two versions of this function. btreeParseCell() takes a
54126 /* The value returned by this function should always be the same as
54129 ** this function verifies that this invariant is not violated. */
54304 ** This function may detect corruption within pPg. If corruption is
54960 int rc = SQLITE_OK; /* Result code from this function */
55278 ** inserting them into a leaf page (function fillInCell()). If
55502 ** This function is similar to sqlite3BtreeGetReserve(), except that it
55679 ** The caller detects this and calls this function again. This is
55731 ** zero and return SQLITE_OK. The caller will call this function
56264 ** calling this function again), return SQLITE_DONE. Or, if an error
56267 ** More specifically, this function attempts to re-organize the database so
56271 ** were this function called until it returns SQLITE_DONE.
56273 ** If the bCommit parameter is non-zero, this function assumes that the
56306 ** truncated to zero after this function returns, so it doesn't
56393 ** A write-transaction must be opened before calling this function.
56396 ** If the incremental vacuum is finished after this function has run,
56545 ** This function is called from both BtreeCommitPhaseTwo() and BtreeRollback()
56597 ** finalize the underlying journal file, this function returns an error and
56789 ** using the sqlite3BtreeSavepoint() function.
56811 ** The second argument to this function, op, is always SAVEPOINT_ROLLBACK
56812 ** or SAVEPOINT_RELEASE. This function either releases or rolls back the
56883 struct KeyInfo *pKeyInfo, /* First arg to comparison function */
57012 ** compiler is not doing aggressive inlining.) So we use a real function
57027 /* Use a real function in MSVC to work around bugs in that compiler. */
57038 /* Use a macro in all other compilers so that the function is inlined */
57088 ** Failure is not possible. This function always returns SQLITE_OK.
57105 ** ovfl), this function finds the page number of the next page in the
57212 ** This function is used to read or overwrite payload information
57227 ** eOp argument is not 2, this function may allocate space for and lazily
57349 ** function.
57547 ** This function returns SQLITE_CORRUPT if the page-header flags field of
57582 ** Page pParent is an internal (non-leaf) tree page. This function
57641 ** If this function returns successfully, it may be assumed that the
57688 ** if the root page was already loaded when this function was called (i.e.
58092 ** The calling function will set *pRes to 0 or 1. The initial *pRes value
58202 ** The calling function will set *pRes to 0 or 1. The initial *pRes value
58628 ** This function is used to add page iPage to the database file free-list.
58631 ** The value passed as the second argument to this function is optional.
58637 ** its reference count is not altered by this function.
59182 ** szCell[] array contains the size in bytes of each cell. This function
59187 ** function works around problems caused by this by making a copy of any
59190 ** The MemPage.nFree field is invalidated by this function. It is the
59236 ** contains the size in bytes of each such cell. This function attempts to
59248 ** When this function is called, *ppData points to the start of the
59292 ** contains the size in bytes of each such cell. This function adds the
59297 ** This function returns the total number of cells added to the free-list.
59348 ** The pPg->nFree field is invalid when this function returns. It is the
59498 /* This error condition is now caught prior to reaching this function */
59572 ** This function does not contribute anything to the operation of SQLite.
59613 ** This function is used to copy the contents of the b-tree node stored
59625 ** The performance of this function is not critical. It is only used by
59698 ** The third argument to this function, aOvflSpace, is a pointer to a
59701 ** used to store the parent's overflow cells. Because this function inserts
59707 ** If aOvflSpace is set to a null pointer, this function returns
59763 ** index iParentIdx. This scenario comes about when this function
59780 ** way, the remainder of the function does not have to deal with any
59827 ** four bytes of it, and this function does not need the first
60387 ** This function is called when the root page of a b-tree structure is
60454 ** some way. This function figures out if this modification means the
60478 ** balance_deeper() function to create a new child for the root-page
60518 ** function. If this were not verified, a subtle bug involving reuse
60555 ** balance_nonroot(), or just before this function returns, whichever
60596 ** point to any entry or to no entry at all and so this function has to seek
60640 ** integer key to use. It then calls this function to actually insert the
61253 ** This function may only be called if the b-tree connection already
61907 ** this function.
62098 ** This function returns a pointer to a blob of memory associated with
62112 ** Just before the shared-btree is closed, the function passed as the
62114 ** blob of allocated memory. The xFree function should not call sqlite3_free()
62173 ** This function modifies the data stored as part of that entry.
62176 ** change the length of the data stored. If this function is called with
62347 ** * Via the sqlite3_backup_XXX() API function backup_step() and
62377 ** function. If an error occurs while doing so, return 0 and write an
62623 ** this function is a no-op.
62695 ** before this function exits.
62870 /* If bCloseTrans is true, then this function opened a read transaction
62975 ** This function is called after the contents of page iPage of the
62983 ** corresponding to the source database is held when this function is
63016 ** corresponding to the source database is held when this function is
63055 ** from this function, not directly by the user.
63363 ** A MEM_Null value will never be passed to this function. This function is
63406 ** Memory cell pMem contains the context of an aggregate function.
63407 ** This routine calls the finalize method for that function. The
63941 void (*xDel)(void*) /* Destructor function */
64125 /* This function is only available internally, it is not part of the
64174 ** the second argument to this function is NULL, the object is allocated
64177 ** Otherwise, if the second argument is non-zero, then this function is
64180 ** that function will return to its caller here. Then return a pointer to
64226 ** to be a scalar SQL function. If
64228 ** * all function arguments are SQL literals,
64229 ** * the SQLITE_FUNC_CONSTANT function flag is set, and
64230 ** * the SQLITE_FUNC_NEEDCOLL function flag is not set,
64232 ** then this routine attempts to invoke the SQL function. Assuming no
64236 ** Affinity aff is applied to the result of the function before returning.
64240 ** If the conditions above are not met, this function returns SQLITE_OK
64253 sqlite3_context ctx; /* Context object for function invocation */
64254 sqlite3_value **apVal = 0; /* Function arguments */
64256 FuncDef *pFunc = 0; /* Function definition */
64259 function name in bytes */
64260 ExprList *pList = 0; /* Function arguments */
64488 ** The implementation of the sqlite_record() function. This function accepts
64532 FUNCTION(sqlite_record, 1, 0, 0, recordFunc),
64605 ** This function is used to allocate and populate UnpackedRecord
64609 ** A single call to this function attempts to populates field iVal (leftmost
64617 ** * The sqlite3ValueFromExpr() function is able to extract a value
64625 ** When this function is called, *ppRec must either point to an object
64626 ** allocated by an earlier call to this function, or must be NULL. If it
64927 ** Use the sqlite3VdbeResolveLabel() function to fix an address and
64928 ** the sqlite3VdbeChangeP4() function to change the value of the P4
65092 ** The following type and function are used to iterate through all opcodes
65174 ** match, or false otherwise. This function is intended to be used as
65211 #endif /* SQLITE_DEBUG - the sqlite3AssertMayAbort() function */
65314 ** This function returns a pointer to the array of opcodes associated with
65317 ** vdbeFreeOpArray() function.
65963 ** function is a no-op.
66025 /* NB: The sqlite3OpcodeName() function is implemented by code created
66425 ** This function may be called exactly once on each virtual machine.
66477 ** an array to marshal SQL function arguments in.
67065 ** This function is called when a transaction opened by the database
67070 ** If there are outstanding FK violations and this function returns
67106 /* This function contains the logic that determines if a statement or
67155 ** file as part of an effort to free up cache space (see function
67313 ** This function does not clear the VDBE error code or message, just
67462 ** function invoked by the OP_Function opcode at instruction iOp of
67465 ** * the associated function parameter is the 32nd or later (counting
67469 ** function parameter corresponds to bit 0 etc.).
67494 ** The difference between this function and sqlite3VdbeDelete() is that
67830 ** This function is implemented as two separate routines for performance.
68039 ** This function compares two index or table record keys in the same way
68041 ** this function deserializes and compares values using the
68191 ** comparison function directly */
68234 ** Two NULL values are considered equal by this function.
68306 /* If a NULL pointer was passed as the collate function, fall through
68316 ** The first argument passed to this function is a serial-type that
68319 ** serialized according to serial_type. This function deserializes
68357 ** This function
68568 ** This function is an optimized version of sqlite3VdbeRecordCompare()
68663 ** This function is an optimized version of sqlite3VdbeRecordCompare()
68723 ** Return a pointer to an sqlite3VdbeRecordCompare() compatible function
68906 ** sequences, or changing an authorization function are the types of
69000 ** collating sequences are registered or if an authorizer function is
69192 ** the function result.
69194 ** The setStrOrError() function calls sqlite3VdbeMemSetStr() to store the
69198 ** The invokeValueDestructor(P,X) routine invokes destructor function X()
69202 sqlite3_context *pCtx, /* Function context */
69206 void (*xDel)(void*) /* Destructor function */
69375 ** This function is called after a transaction has been committed. It
69603 ** application defined function.
69634 ** The following is the implementation of an SQL function that always
69635 ** fails with an error message stating that the function is used in the
69637 ** SQL function that use this routine so that the functions will exist
69642 sqlite3_context *context, /* The function calling context */
69643 int NotUsed, /* Number of arguments to the function */
69650 "unable to use function %s in the requested context", zName);
69677 ** Allocate or return the aggregate context for a user function. A new
69694 ** the user-function defined by pCtx.
69713 ** Set the auxiliary data pointer and delete function, for the iArg'th
69714 ** argument to the user-function defined by pCtx. Any previous value is
69715 ** deleted by calling the delete function specified when it was set.
69764 ** Return the number of times the Step function of an aggregate has been
69767 ** This function is deprecated. Do not use it for new code. It is
69768 ** provide only to avoid breaking legacy code. New aggregate function
69857 ** This function is called after invoking an sqlite3_value_XXX function on a
70603 ** This function returns a pointer to a nul-terminated string in memory
70615 ** The calling function is responsible for making sure the memory returned
70757 ** The code in this file implements the function that runs the
70786 ** working correctly. This variable has no function other than to
70798 ** This facility is used for testing purposes only. It does not function
70809 ** has no function other than to help verify the correct operation of the
70820 ** is working correctly. This variable has no function other than to
70836 ** has no function other than to help verify the correct operation of the
71047 ** Try to convert the type of a function argument or a result column
71315 ** stub function. You will lose timing support for many
71332 ** This function is only called from within an assert() expression. It
72365 ** P4 is a pointer to a CollSeq struct. If the next call to a user function
72386 /* Opcode: Function P1 P2 P3 P4 P5
72389 ** Invoke a user function (P4 is a pointer to a Function structure that
72390 ** defines the function) with P5 arguments taken from register P2 and
72391 ** successors. The result of the function is stored in register P3.
72392 ** Register P3 must not be one of the function inputs.
72395 ** function was determined to be constant at compile time. If the first
72397 ** whether meta data associated with a user function argument using the
72437 /* If the function returned an error, throw an exception */
72446 /* Copy the result of the function into register P3 */
72652 ** are text, then the appropriate collating function specified in
73126 ** or typeof() function, respectively. The loading of large blobs can be
73347 ** 1. the typeof() function,
73348 ** 2. the length(X) function if X is a blob, and
73877 ** halts. The sqlite3_step() wrapper function might then reprepare the
74965 ** sqlite3_last_insert_rowid() function (otherwise it is unmodified).
75466 ** P4 is always of type P4_ADVANCE. The function pointer points to
75499 ** P4 is always of type P4_ADVANCE. The function pointer points to
76228 ** exception using the RAISE() function. Register P3 contains the address
76533 ** Execute the step function for an aggregate. The
76534 ** function has P5 arguments. P4 is a pointer to the FuncDef
76535 ** structure that specifies the function. Use register
76587 ** Execute the finalizer function for an aggregate. P1 is
76590 ** P2 is the number of arguments that the step function takes and
76591 ** P4 is a pointer to the FuncDef for this function. The P2
76595 ** the step function was not previously called.
77459 ** This function is used by both blob_open() and blob_reopen(). It seeks
77552 ** The sqlite3_blob_close() function finalizes the vdbe program,
78200 SorterCompare xCompare; /* Compare function to use */
78337 ** converted to use the SorterRecord.u.pNext pointers. See function
78382 ** next call to this function.
78615 ** starting at offset iStart and ending at offset iEof-1. This function
78674 ** If IN/OUT parameter *pbKey2Cached is true when this function is called,
78915 #undef nWorker /* Defined at the top of this function */
79036 /* This function is always called by the main user thread.
79038 ** If this function is being called after SorterRewind() has been called,
79162 ** is guaranteed to be nByte bytes or smaller in size. This function
79266 ** Return the SorterCompare function to compare values collected by the
79440 ** This is used by an assert() statement at the end of this function. */
79815 ** This function is called when the PmaReader corresponding to pIncr has
79826 ** been exhausted, this function also launches a new background thread
79973 ** function returns, the first key of merged data may be read from the
80029 ** incremental-reader (pReadr->pIncr!=0). This function serves to open
80039 ** to be a multi-threaded PmaReader and this function is being called in a
80046 ** The reason this function does not call vdbePmaReaderNext() immediately
80049 ** this entire function is being run by thread (pTask->thread), that will
80102 ** then this function is already running in background thread
80139 ** (if pReadr->pIncr==0), then this function is a no-op. Otherwise, it invokes
80140 ** the vdbePmaReaderIncrMergeInit() function with the parameters passed to
80145 ** Or, if the IncrMerger is single threaded, the same function is called
80172 ** When this function is called, *piOffset is set to the offset of the
80230 ** tree, counting from zero. This function adds pLeaf to the tree.
80281 ** This function is called as part of a SorterRewind() operation on a sorter
80362 ** This function is called as part of an sqlite3VdbeSorterRewind() operation
80449 ** this function is called to prepare for iterating through the records
80472 ** function flushes the contents of memory to disk, it immediately always
80651 ** 2) The sqlite3JournalCreate() function is called.
80691 ** function was called. */
81318 ** Walk the expression tree pExpr and increase the aggregate function
81324 ** is a helper function - a callback for the tree walker.
81899 ** function names. The operator for aggregate functions is changed
81974 /* Resolve function names
81979 int no_such_func = 0; /* True if no such function exists */
81981 int is_agg = 0; /* True if is an aggregate function */
81982 int auth; /* Authorization to use the function */
81983 int nId; /* Number of characters in function name */
81984 const char *zId; /* The function name. */
81985 FuncDef *pDef; /* Information about the function */
82013 /* EVIDENCE-OF: R-61304-29449 The unlikely(X) function is
82015 ** EVIDENCE-OF: R-01283-11636 The unlikely(X) function is
82017 ** EVIDENCE-OF: R-36850-34127 The likely(X) function is short-hand
82019 ** EVIDENCE-OF: R-53436-40973 The likely(X) function is equivalent
82029 sqlite3ErrorMsg(pParse, "not authorized to use function: %s",
82042 sqlite3ErrorMsg(pParse, "misuse of aggregate function %.*s()", nId,zId);
82046 sqlite3ErrorMsg(pParse, "no such function: %.*s", nId, zId);
82049 sqlite3ErrorMsg(pParse,"wrong number of arguments to function %.*s()",
82073 ** type of the function
82488 ** was created by the convertCompoundSelectToSubquery() function.
82649 ** checking on function usage and set a flag if any aggregate functions
82675 ** Table-name and function resolution occurs on the substituted expression
82684 ** Function calls are checked to make sure that the function is
82686 ** If the function is an aggregate function, then the NC_HasAgg flag is
82898 ** or likelihood() function at the root of an expression.
83195 ** Set the Expr.nHeight variable using the exprSetHeight() function. If
83235 ** obtained from sqlite3DbMalloc(). The calling function
83419 ** Construct a new expression node for a function with multiple
83567 ** The dupedExprStructSize() function returns two values OR-ed together:
83613 ** This function
83650 ** This function is similar to sqlite3ExprDup(), except that if pzBuffer
83655 ** portion of the buffer copied into by this function.
83875 ** on the duplicate created by this function. */
84101 ** and either pWalker->eCode==4 or 5 or the function has the
84161 ** and 0 if it involves variables or function calls.
84163 ** For the purposes of this function, a double-quoted string (ex: "abc")
84174 ** Return 0 if it involves variables or function calls or terms from
84184 ** expression must not refer to any non-deterministic function nor any
84193 ** or a function call with constant arguments. Return and 0 if there
84196 ** For the purposes of this function, a double-quoted string (ex: "abc")
84413 ** This function is used by the implementation of the IN (...) operator.
84424 ** The returned value of this function indicates the b-tree type, as follows:
84469 ** When the b-tree is being used for membership tests, the calling function
84518 /* This function is only called from two places. In both cases the vdbe
85374 ** register if it is convenient to do so. The calling function
85625 ExprList *pFarg; /* List of function arguments */
85626 int nFarg; /* Number of function arguments */
85627 FuncDef *pDef; /* The function definition object */
85628 int nId; /* Length of the function name in bytes */
85629 const char *zId; /* The function name */
85630 u32 constMask = 0; /* Mask of function arguments that are constant */
85647 sqlite3ErrorMsg(pParse, "unknown function: %.*s()", nId, zId);
85671 /* The UNLIKELY() function is a no-op. The result is the value
85724 /* Possibly overload the function if the first argument is
85732 ** function. The expression "A glob B" is equivalent to
85734 ** for function overloading. But we use the B term in "glob(B,A)".
86237 ExprList *pFarg; /* List of function arguments */
86247 sqlite3TreeViewLine(pView, "FUNCTION %Q", pExpr->u.zToken);
86904 ** aggregate function, in order to implement the
86940 ** Determine if any of the arguments to the pExpr Function reference
86941 ** pSrcList. Return true if they do. Also return true if the function
87078 ** function that is already in the pAggInfo structure
87252 ** This function is used by SQL generated to implement the
87314 ** This C function implements an SQL user function that is used by SQL code
87379 /* This function is used by SQL generated to implement the
87460 FUNCTION(sqlite_rename_table, 2, 0, 0, renameTableFunc),
87462 FUNCTION(sqlite_rename_trigger, 2, 0, 0, renameTriggerFunc),
87465 FUNCTION(sqlite_rename_parent, 3, 0, 0, renameParentFunc),
87478 ** This function is used to create the text of expressions of the form:
87558 ** pTab->zName if this function is being called to code part of an
87605 ** If the table is a system table, this function leaves an error message
87713 /* If this is a virtual table, invoke the xRename() function if
87846 ** This function is called after an "ALTER TABLE ... ADD" statement
87966 ** This function is called by the parser after the table-name in
88016 ** sqlite3AddColumn() function and friends to modify. But modify
88433 ** Implementation of the stat_init(N,K,C) SQL function. The three parameters
88470 /* Decode the three function arguments */
88555 ** function returns true if sample pNew is to be preferred over pOld.
88559 ** This function assumes that for each argument sample, the contents of
88583 ** This function assumes that for each argument sample, the contents of
88754 ** Implementation of the stat_push SQL function: stat_push(P,C,R)
88762 ** This SQL function always returns NULL. It's purpose it to accumulate
88764 ** index being analyzed. The stat_get() SQL function will later be used to
88776 /* The three function arguments */
88786 /* This is the first call to this function. Do initialization. */
88858 ** Implementation of the stat_get(P,J) SQL function. This routine is
88867 ** a one-parameter function, stat_get(P), that always returns the
89147 /* Invoke the stat_init() function. The arguments are:
89718 ** see the caller of this function for details):
89889 ** If an OOM error occurs, this function always sets db->mallocFailed.
90004 ** An SQL user-function registered to do the work of an ATTACH statement. The
90005 ** three arguments to the function come directly from an attach statement:
90208 ** An SQL user-function registered to do the work of an DETACH statement. The
90209 ** three arguments to the function come directly from a detach statement:
90567 ** Set or clear the access authorization function.
90569 ** The access authorization function is be called during the compilation
90571 ** various fields of the database. The first argument to the auth function
90573 ** to the auth function is one of these constants:
90599 ** The third and fourth arguments to the auth function are the name of
90600 ** the table and the column that are being accessed. The auth function
90608 ** Setting the auth function to NULL disables this hook. The default
90609 ** setting of the auth function is NULL.
90629 ** user-supplied authorization function returned an illegal value.
90638 ** table zTab in database zDb. This function assumes that an authorization
90678 ** If the auth function returns SQLITE_IGNORE, change the TK_COLUMN
90679 ** instruction into a TK_NULL. If the auth function returns SQLITE_DENY,
91182 ** sqlite3LocateTable() and this function is that this function restricts
91472 ** function.
91508 ** function returns the index of the named database in db->aDb[], or
92173 ** Set the collation function of the most recently parsed table column
92209 ** This function returns the collation sequence for database native text
92288 ** which to write into the output buffer. This function copies the
92324 ** from sqliteMalloc() and must be freed by the calling function.
93019 ** This function is called by the VDBE to adjust the internal schema
94230 ** When this function is called, *pnEntry contains the current size of
94652 ** This function is called by the parser when it parses a command to create,
94939 ** collating function. Forms 3 and 4 rebuild the named index or all
95152 ** collation function in the best encoding but there may be other versions
95153 ** of this collation function (for other text encodings) available. Use one
95174 ** This function is responsible for invoking the collation factory callback
95302 ** A separate function sqlite3LocateCollSeq() is a wrapper around
95327 /* During the search for the best function definition, this procedure
95328 ** is called to test how well the function passed as the first argument
95329 ** matches the request for a function with nArg arguments in a system
95334 ** is also -1. In other words, we are searching for a function that
95337 ** If nArg is -2 that means that we are searching for any function
95344 ** 1: UTF8/16 conversion required and function takes any number of arguments.
95345 ** 2: UTF16 byte order change required and function takes any number of args.
95346 ** 3: encoding matches and function takes any number of arguments
95351 ** If nArg==(-2) then any function with a non-null xStep or xFunc is
95352 ** a perfect match and any function with both xStep and xFunc NULL is
95357 FuncDef *p, /* The function we are evaluating for match quality */
95369 /* Give a better score to a function with a specific number of arguments
95370 ** than to function that accepts any number of arguments. */
95388 ** Search a FuncDefHash for a function with the given name. Return
95394 const char *zFunc, /* Name of function */
95411 FuncDef *pDef /* The function definition to insert */
95432 ** Locate a user function given a name, a number of arguments and a flag
95433 ** indicating whether the function prefers UTF-16 over UTF-8. Return a
95434 ** pointer to the FuncDef structure that defines that function, or return
95435 ** NULL if the function does not exist.
95439 ** no matching function previously existed.
95441 ** If nArg is -2, then the first valid function found is returned. A
95442 ** function is valid if either xFunc or xStep is non-zero. The nArg==(-2)
95443 ** case is used to see if zName is a valid function name for some number
95446 ** If createFlag is false, then a function with the required name and
95452 const char *zName, /* Name of the function. Not null-terminated */
95482 ** functions even if a prior app-defined function was found. And give
95486 ** install a new function. Whatever FuncDef structure is returned it will
95488 ** new function. But the FuncDefs for built-in functions are read-only.
95489 ** So we must not search for built-ins when creating a new function.
95527 ** at a Schema struct. This function does not call sqlite3DbFree(db, ) on the
95945 ** API function sqlite3_count_changes) to be set incorrectly. */
96128 ** invoke the callback function.
96439 ** functions of SQLite. (Some function, and in particular the date and
96446 ** Return the collating function associated with a function.
96517 ** Implementation of the length() function
96554 ** Implementation of the abs() function.
96556 ** IMP: R-23979-26855 The abs(X) function returns the absolute value of
96598 ** Implementation of the instr() function.
96648 ** Implementation of the printf() function.
96674 ** Implementation of the substr() function.
96777 ** Implementation of the round() function
96884 ** However, we still need some kind of function implementation for this
96885 ** routines in the function table. The noopFunc macro provides this.
96887 ** is. We might as well use the "version()" function as a substitute.
96889 #define noopFunc versionFunc /* Substitute function - never called */
96941 ** Implementation of the last_insert_rowid() SQL function. The return
96942 ** value is the same as the sqlite3_last_insert_rowid() API function.
96951 /* IMP: R-51513-12026 The last_insert_rowid() SQL function is a
96953 ** function. */
96958 ** Implementation of the changes() SQL function.
96960 ** IMP: R-62073-11209 The changes() SQL function is a wrapper
96961 ** around the sqlite3_changes() C/C++ function and hence follows the same
96975 ** Implementation of the total_changes() SQL function. The return value is
96976 ** the same as the sqlite3_total_changes() API function.
96985 /* IMP: R-52756-41993 This function is a wrapper around the
97204 ** Implementation of the like() SQL function. This function implements
97205 ** the build-in LIKE operator. The first argument to the function is the
97212 ** This same function (with a different compareInfo structure) computes
97264 ** Implementation of the NULLIF(x,y) function. The result is the first
97281 ** Implementation of the sqlite_version() function. The result is the version
97290 /* IMP: R-48699-48617 This function is an SQL wrapper around the
97296 ** Implementation of the sqlite_source_id() function. The result is a string
97306 /* IMP: R-24470-31136 This function is an SQL wrapper around the
97312 ** Implementation of the sqlite_log() function. This is a wrapper around
97313 ** sqlite3_log(). The return value is NULL. The function exists purely for
97327 ** Implementation of the sqlite_compileoption_used() function.
97341 ** function is a wrapper around the sqlite3_compileoption_used() C/C++
97342 ** function.
97351 ** Implementation of the sqlite_compileoption_get() function.
97364 /* IMP: R-04922-24076 The sqlite_compileoption_get() SQL function
97365 ** is a wrapper around the sqlite3_compileoption_get() C/C++ function.
97380 ** Implementation of the QUOTE() function. This function takes a single
97459 ** The unicode() function. Return the integer unicode code-point value
97473 ** The char() function takes zero or more arguments, each of which is
97515 ** The hex() function. Interpret the argument as a blob. Return
97544 ** The zeroblob(N) function returns a zero-filled blob of size N bytes.
97566 ** The replace() function. Three arguments are all strings: call
97736 /* IMP: R-25361-16150 This function is omitted from SQLite by default. It
97744 ** IMP: R-59782-00072 The soundex(X) function returns a string that is the
97798 ** A function that loads a shared-library extension then returns NULL.
97835 ** The SUM() function follows the (broken) SQL standard which means
97892 ** count() aggregate function.
97900 ** Routines to implement the count() aggregate function.
97910 /* The sqlite3_aggregate_count() function is deprecated. But just to make
97945 /* This step function is used for both the min() and max() aggregates,
97948 ** sqlite3_user_data() function returns (void *)-1. For min() it
98027 ** This routine does per-connection function registration. Most
98028 ** of the built-in functions above are part of the global function set.
98040 ** Set the LIKEOPT flag on the 2-argument function with the given name.
98073 ** pExpr points to an expression which implements a function. If
98074 ** it is appropriate to apply the LIKE optimization to that function
98076 ** return TRUE. If the function is not a LIKE-style function then
98080 ** the function (default for LIKE). If the function makes the distinction
98114 ** to the global function
98129 FUNCTION(ltrim, 1, 1, 0, trimFunc ),
98130 FUNCTION(ltrim, 2, 1, 0, trimFunc ),
98131 FUNCTION(rtrim, 1, 2, 0, trimFunc ),
98132 FUNCTION(rtrim, 2, 2, 0, trimFunc ),
98133 FUNCTION(trim, 1, 3, 0, trimFunc ),
98134 FUNCTION(trim, 2, 3, 0, trimFunc ),
98135 FUNCTION(min, -1, 0, 1, minmaxFunc ),
98136 FUNCTION(min, 0, 0, 1, 0 ),
98139 FUNCTION(max, -1, 1, 1, minmaxFunc ),
98140 FUNCTION(max, 0, 1, 1, 0 ),
98145 FUNCTION(instr, 2, 0, 0, instrFunc ),
98146 FUNCTION(substr, 2, 0, 0, substrFunc ),
98147 FUNCTION(substr, 3, 0, 0, substrFunc ),
98148 FUNCTION(printf, -1, 0, 0, printfFunc ),
98149 FUNCTION(unicode, 1, 0, 0, unicodeFunc ),
98150 FUNCTION(char, -1, 0, 0, charFunc ),
98151 FUNCTION(abs, 1, 0, 0, absFunc ),
98153 FUNCTION(round, 1, 0, 0, roundFunc ),
98154 FUNCTION(round, 2, 0, 0, roundFunc ),
98156 FUNCTION(upper, 1, 0, 0, upperFunc ),
98157 FUNCTION(lower, 1, 0, 0, lowerFunc ),
98158 FUNCTION(coalesce, 1, 0, 0, 0 ),
98159 FUNCTION(coalesce, 0, 0, 0, 0 ),
98161 FUNCTION(hex, 1, 0, 0, hexFunc ),
98168 FUNCTION(nullif, 2, 0, 1, nullifFunc ),
98169 FUNCTION(sqlite_version, 0, 0, 0, versionFunc ),
98170 FUNCTION(sqlite_source_id, 0, 0, 0, sourceidFunc ),
98171 FUNCTION(sqlite_log, 2, 0, 0, errlogFunc ),
98173 FUNCTION(sqlite_crypt, 2, 0, 0, sqlite3CryptFunc ),
98176 FUNCTION(sqlite_compileoption_used,1, 0, 0, compileoptionusedFunc ),
98177 FUNCTION(sqlite_compileoption_get, 1, 0, 0, compileoptiongetFunc ),
98179 FUNCTION(quote, 1, 0, 0, quoteFunc ),
98183 FUNCTION(replace, 3, 0, 0, replaceFunc ),
98184 FUNCTION(zeroblob, 1, 0, 0, zeroblobFunc ),
98186 FUNCTION(soundex, 1, 0, 0, soundexFunc ),
98189 FUNCTION(load_extension, 1, 0, 0, loadExt ),
98190 FUNCTION(load_extension, 2, 0, 0, loadExt ),
98520 ** This function is called when a row is inserted into or deleted from the
98522 ** on the child table of pFKey, this function is invoked twice for each row
98526 ** Each time it is called, this function generates VDBE code to locate the
98733 ** This function is called to generate code executed when a row is deleted
98736 ** code for an SQL UPDATE operation, this function may be called twice -
98743 ** The code generated by this function scans through the rows in the child
98875 ** This function returns a linked list of FKey objects (connected by
98882 ** Calling this function with table "t1" as an argument returns a pointer
98884 ** "t2". Calling this function with "t2" as the argument would return a
98894 ** fkActionTrigger() routine. This function deletes the Trigger structure
98912 ** This function is called to generate code that runs when table pTab is
98914 ** to this function contains a single entry guaranteed to resolve to
98986 ** This function returns true if any of the columns that are part of the
99013 ** This function returns true if any of the columns that are part of the
99059 ** This function is called when inserting, deleting or updating a row of
99073 ** For an UPDATE operation, this function is called twice. Once before
99095 /* If foreign-keys are disabled, this function is a no-op. */
99250 ** (when this function is called as part of processing the UPDATE
99274 ** This function is called before generating code to update or delete a
99301 ** This function is called before generating code to update or delete a
99310 ** If any foreign key processing will be required, this function returns
99311 ** true. If there is no foreign key related processing, this function
99346 ** This function is called when an UPDATE or DELETE operation is being
99557 ** This function is called when deleting or updating a row to implement
100010 ** See the xferOptimization() function for the implementation of this
100647 ** invoke the callback function.
101715 ** the xCallback() function is called. pArg becomes the first
101760 /* Invoke the callback function if required */
101788 /* EVIDENCE-OF: R-38229-40159 If the callback function to
102481 ** also check to make sure that the pointer to the function is
102556 0, /* Was sqlite3_global_recover(), but that function is deprecated */
102772 ** error message text. The calling function should free this memory
103660 /* The sqlite3GetBoolean() function is used by other modules but the
103819 ** defined in pager.h. This function returns the associated lowercase
104091 ** the sqlite3AbsInt32() function.
105456 ** sqlite3_soft_heap_limit64(-1) C-language function.
105794 ** will be closed before this function returns. */
106083 ** function should never be used.
106390 /* This function currently works by first transforming the UTF-16
106760 ** This function is used to add terms implied by JOIN syntax to the
107506 ** function is responsible for seeing that this structure is eventually
107554 ** Unless an "EXPLAIN QUERY PLAN" command is being processed, this function
107588 ** Unless an "EXPLAIN QUERY PLAN" command is being processed, this function
107596 ** function parameters, and op is the text representation of the parameter
107762 ** considered a column by this function.
108339 ** with an ORDER BY clause. This function allocates and returns a KeyInfo
108343 ** function is responsible for ensuring that this structure is eventually
108656 assert( p && p->pPrior ); /* Calling function guarantees this much */
108675 assert( v!=0 ); /* The VDBE already created by calling function */
109533 ** by the calling function */
109710 ** until we introduced the group_concat() function.
110129 ** function attempts to flatten a compound sub-query into pParent
110197 ** argument, this function checks if the following are true:
110199 ** * the query contains just a single aggregate function,
110200 ** * the aggregate function is either min() or max(), and
110201 ** * the argument to the aggregate function is a column value.
110215 Expr *pExpr = pAggInfo->aFunc[0].pExpr; /* Aggregate function */
110216 ExprList *pEList = pExpr->x.pList; /* Arguments to agg function */
110238 ** function tests if the SELECT is of the form:
110418 ** This function checks if argument pFrom refers to a CTE declared by
110542 ** This function is used as the xSelectCallback2() callback by
110881 ** The calling function can detect the problem by looking at pParse->nErr
111036 ** Invoke the OP_AggFinalize opcode for every aggregate function
111170 ** calling function needs to do that.
111186 int rc = 1; /* Value to return from this function */
112102 ** to the callback function is uses to build the result.
112354 ** sqlite3FinishTrigger() function is called to complete the trigger
112754 ** This function is called to drop a trigger from the database schema.
113048 ** This function is used to add VdbeComment() annotations to a VDBE
113230 ** function are the same as those described in the header function for
113273 ** operation on pTab, this function is a no-op.
113296 ** ON INSERT trigger, the value passed to this function as parameter reg
113344 ** This function returns a 32-bit bitmask indicating which columns of the
113451 ** function is capable of transforming these types of expressions into
114052 ** invoke the callback function.
114580 ** The actual function that does the work of creating a new module.
114581 ** This function implements the sqlite3_create_module() and
114589 void (*xDestroy)(void *) /* Module destructor function */
114626 ** External API function used to create a new virtual-table module.
114641 ** External API function used to create a new virtual-table module.
114648 void (*xDestroy)(void *) /* Module destructor function */
114703 ** Table p is a virtual table. This function moves all elements in the
114716 ** above function sqlite3VtabUnlockList() for an explanation of why
114742 ** Table *p is a virtual table. This function removes the VTable object
114770 ** This function may only be called when the mutexes associated with all
114775 ** 1) By this function. In this case, all BtShared mutexes and the mutex
114778 ** 2) By function vtabDisconnectAll(), when it adds a VTable entry to
115030 function to invoke is passed as the fourth parameter
115162 ** This function is invoked by the parser to call the xConnect() method
115231 ** This function is invoked by the vdbe to call the xCreate method
115275 ** This function is used to set the schema of a virtual table. It is only
115276 ** valid to call this function from within the xCreate() or xConnect() of a
115344 ** This function is invoked by the vdbe to call the xDestroy method
115378 ** This function invokes either the xRollback or xCommit method
115461 ** than zero, then this function is being called from within a
115508 ** function immediately. If all calls to virtual table methods are successful,
115545 ** The first parameter (pDef) is a function implementation. The
115546 ** second parameter (pExpr) is the first argument to this function.
115548 ** table implementation have an opportunity to overload the function.
115559 FuncDef *pDef, /* Function to possibly overload */
115560 int nArg, /* Number of arguments to the function */
115561 Expr *pExpr /* First argument to the function */
115587 ** to see if the implementation wants to overload this function
115601 /* Create a new ephemeral function definition for the overloaded
115602 ** function */
116877 ** function, then no OP_Variable will be added to the program.
117687 ** This function searches pList for an entry that matches the iCol-th column
118049 ** by passing the pointer returned by this function to sqlite3_free().
118156 ** The table object reference passed as the second argument to this function
118157 ** must represent a virtual table. This function invokes the xBestIndex()
118159 ** comes in as the 3rd argument to this function.
118399 ** that the scan will visit nNew rows. This function returns the number
118404 ** input rows. Otherwise, this function assumes that an "IS NOT NULL" term
118421 ** This function is called to estimate the number of rows visited by a
118428 ** visited for scanning (a=? AND b=?). This function reduces that estimate
118447 ** Normally, this function sets *pbDone to 1 before returning. However,
118507 ** using the method described in the header comment for this function. */
118529 ** This function is used to estimate the number of rows that will be visited
118557 ** When this function is called, *pnOut is set to the sqlite3LogEst() of the
119195 ** function appends text to pStr that describes the subset of table
119202 ** is run and there is an index on (a, b), then this function returns a
119240 ** This function is a no-op unless currently processing an EXPLAIN QUERY PLAN
119715 ** was passed to this function to implement a "SELECT min(x) ..."
120856 ** When this function is called, pBuilder->pNew->nOut contains the
120859 ** function returns.
121206 ** The costs (WhereLoop.rRun) of the b-tree loops added by this function
121807 CollSeq *pColl; /* COLLATE function from an ORDER BY clause term */
122032 ** this function may be called on the returned WhereInfo object. It returns
122149 ** will invoke this function a second time, passing the estimate as the
122536 ** should invoke sqlite3WhereEnd() with the return value of this function
122631 WhereInfo *pWInfo; /* Will become the return value of this function */
122667 /* This function normally generates a nested loop for all tables in
124583 ** This function allocates a new parser.
124584 ** The only argument is a pointer to a function which works like
124588 ** A pointer to the function used to allocate memory.
124611 /* The following function deletes the value associated with a
124745 ** <li> A pointer to a function used to reclaim memory obtained
124751 void (*freeProc)(void*) /* Function used to reclaim memory */
126014 sqlite3ErrorMsg(pParse, "too many arguments on function %T", &yymsp[-4].minor.yy0);
126723 ** * Call the %syntax_error function.
126863 ** The sqlite3KeywordCode function looks up an identifier to determine if
126881 ** The code in this file implements a function that determines whether
128027 /* IMPLEMENTATION-OF: R-53536-42575 The sqlite3_libversion() function returns
128032 /* IMPLEMENTATION-OF: R-63124-39300 The sqlite3_sourceid() function returns a
128038 /* IMPLEMENTATION-OF: R-35210-63508 The sqlite3_libversion_number() function
128043 /* IMPLEMENTATION-OF: R-20790-14025 The sqlite3_threadsafe() function returns
128063 ** If the following function pointer is not NULL and if
128065 ** I/O active are written using this function. These messages
128312 ** this function resulted in the heap subsystem actually being shutdown.
128528 /* Record a pointer to the logger function and its first argument.
128529 ** The default is NULL. Logging is disabled if the function pointer is
128788 ** This is the default collating function named "BINARY" which is always
128802 ** strings byte by byte using the memcmp() function from the standard C
128885 ** Close all open savepoints. This function only manipulates fields of the
128901 ** Invoke the destructor function associated with FuncDef p, if any. Except,
128902 ** if this is not the last copy of the function, do not invoke it. Multiple
128903 ** copies of a single function are created when create_function() is called
129422 ** given callback function with the given argument.
129444 ** given callback function with the given argument. The progress callback will
129506 ** This function is exactly the same as sqlite3_create_function(), except
129545 ** If SQLITE_ANY is specified, add three versions of the function
129567 /* Check if an existing function is being overridden or deleted. If so,
129568 ** and there are active VMs, then return SQLITE_BUSY. If a function
129576 "unable to delete/modify user-function due to active statements");
129590 /* If an older version of the function with a configured destructor is
129591 ** being replaced invoke the destructor function here. */
129697 ** Declare that a function has been overloaded by a virtual table.
129699 ** If the function already exists as a regular global function, then
129700 ** this routine is a no-op. If the function does not exist, then create
129703 ** When virtual tables intend to provide an overloaded function, they
129704 ** should call this routine to make sure the global function exists.
129705 ** A global function must exist in order for name resolution to work
129733 ** Register a trace function. The pArg from the previously registered trace
129736 ** A NULL trace function means that no tracing is executes. A non-NULL
129737 ** trace is a pointer to a function that is invoked at the start of each
129757 ** Register a profile function. The pArg from the previously registered
129758 ** profile function is returned.
129760 ** A NULL profile function means that no profiling is executes. A non-NULL
129761 ** profile is a pointer to a function that is invoked at the conclusion of
129787 ** Register a function to be invoked when a transaction commits.
129788 ** If the invoked function returns non-zero, then the commit becomes a
129793 int (*xCallback)(void*), /* Function to invoke on each commit */
129794 void *pArg /* Argument to the function */
129819 void *pArg /* Argument to the function */
129843 void (*xCallback)(void*), /* Callback function */
129844 void *pArg /* Argument to the function */
129890 ** The callback registered by this function replaces any existing callback
129893 ** configured by this function.
130010 ** function returns SQLITE_LOCKED and a checkpoint is not attempted. If
130016 ** this function while the checkpoint is running.
130050 ** This function returns true if main-memory should be used instead of
130158 ** passed to this function, we assume a malloc() failed during sqlite3_open().
130182 ** function.
130189 ** Create a new collating function for database "db". The name is zName
130235 ** Also, collation destructor - CollSeq.xDel() - function may need
130377 ** This function is used to parse both URIs and non-URI filenames passed by the
130381 ** The first argument to this function is the name of the VFS to use (or
130384 ** itself. When this function is called the *pFlags variable should contain
130774 /* EVIDENCE-OF: R-08308-17224 The default collating function for all
131091 ** This function is now an anachronism. It used to be used to recover from a
131257 /* Whether the function call succeeded or failed, set the output parameters
131289 /* This function works in milliseconds, but the underlying OsSleep()
131615 ** Set the VDBE coverage callback function to xCallback with context
131816 ** This function is a complex assert() that verifies the following
131853 ** db is not currently a part of the list, this function is a no-op.
131965 ** This function is called while stepping or preparing a statement
131980 ** This function is called when
131984 ** This function loops through each entry in the blocked connections
132473 ** sqlite3_tokenizer_module.xCreate() function of the requested tokenizer
132474 ** implementation. The xCreate() function in turn returns an
133450 ** When this function is called, *pp points to the first byte following a
133452 ** of varints). This function moves *pp to point to the start of that varint,
133573 ** If *pRc is non-zero when this function is called, it is a no-op.
133693 ** If *pRc is non-zero when this function is called, it is a no-op.
133817 ** function named zFunc first. For example, if zFunc is "unzip" and the
133826 ** If *pRc is not SQLITE_OK when this function is called, it is a no-op (and
133828 ** by this function, NULL is returned and *pRc is set to SQLITE_NOMEM. If
133883 ** If *pRc is not SQLITE_OK when this function is called, it is a no-op (and
133885 ** by this function, NULL is returned and *pRc is set to SQLITE_NOMEM. If
133911 ** This function interprets the string at (*pp) as a non-negative integer
133921 ** This function is used when parsing the "prefix=" FTS4 parameter.
133942 ** This function is called to allocate an array of Fts3Index structures
134003 ** This function is called when initializing an FTS4 table that uses the
134007 ** The third argument passed to this function is the value passed to the
134008 ** config=xxx option (i.e. "xxx"). This function queries the database for
134092 ** This function is the implementation of both the xConnect and xCreate
134477 ** work is done in function fts3InitVtab().
134503 ** support estimatedRows. In that case this function is a no-op.
134545 ** function MATCH in the requested context" error. To discourage
134570 ** it would lead to an "unable to use function MATCH in the requested
134738 ** This function is used to process a single interior node when searching
134740 ** function via the zNode/nNode parameters. The term to search for is
134743 ** If piFirst is not NULL, then this function sets *piFirst to the blockid
134855 ** contains a term. This function searches the sub-tree headed by the zNode
134868 ** range. Because this function only inspects interior segment nodes (and
134918 ** This function is used to create delta-encoded serialized lists of FTS3
134919 ** varints. Each call to this function appends a single varint to a list.
134932 ** When this function is called, *ppPoslist is assumed to point to the
134943 ** before this function returns.
134976 ** When this function is called, *ppPoslist is assumed to point to the
134989 ** before this function returns. The POS_COLUMN or POS_END terminator
135020 ** This function is used to help parse position-lists. When this function is
135144 ** This function is used to merge two position lists into one. When it is
135155 ** When this function returns, both *pp1 and *pp2 are left pointing to the
135325 ** An instance of this function is used to merge together the (potentially
135327 ** See function fts3TermSelectMerge() for details.
135336 ** This function is used to read a single varint from a buffer. Parameter
135337 ** pEnd points 1 byte past the end of the buffer. When this function is
135339 ** has been reached. In this case *pp is set to 0 and the function returns.
135346 ** function returns.
135368 ** This function is used to write a single varint to a buffer. The varint
135372 ** If *pbFirst is zero when this function is called, the value written to
135375 ** If *pbFirst is non-zero when this function is called, then the value
135379 ** Before returning, this function always sets *pbFirst to 1 and *piPrev
135415 ** This function does an "OR" merge of two doclists (output contains all
135509 ** This function does a "phrase" merge of two doclists. In a phrase merge,
135518 ** The right-hand input doclist is overwritten by this function.
135585 ** function checks to see if the position list contains any entries for
135685 ** as the first argument. The merge is an "OR" merge (see function
135688 ** This function is called with the doclist for each term that matches
135694 ** This function returns SQLITE_OK if the merge is successful, or an
135718 ** Similar padding is added in the fts3DoclistOrMerge() function.
135791 ** This function returns SQLITE_OK if successful, or an SQLite error code
135988 ** This function retrieves the doclist for the specified term (or term
136040 ** This function counts the total number of docids in the doclist stored
136325 ** This function is the implementation of the xUpdate callback used by
136458 ** end of a position-list. i.e. ( (*ppPoslist)[-1]==POS_END ). This function
136496 ** Helper function used by the implementation of the overloaded snippet(),
136506 sqlite3_context *pContext, /* SQL function call context */
136507 const char *zFunc, /* Function name */
136508 sqlite3_value *pVal, /* argv[0] passed to function */
136526 ** Implementation of the snippet() function for FTS3
136529 sqlite3_context *pContext, /* SQLite function call context */
136540 /* There must be at least one argument passed to this function (otherwise
136547 "wrong number of arguments to function snippet()", -1);
136569 ** Implementation of the offsets() function for FTS3
136572 sqlite3_context *pContext, /* SQLite function call context */
136589 ** Implementation of the special optimize() function for FTS3. This
136590 ** function merges all segments in the database to a single segment.
136598 sqlite3_context *pContext, /* SQLite function call context */
136629 ** Implementation of the matchinfo() function for FTS3
136632 sqlite3_context *pContext, /* SQLite function call context */
136653 int nArg, /* Number of SQL function arguments */
136654 const char *zName, /* Name of SQL function */
136680 /* No function of the specified name was found. Return 0. */
136814 ** This function
136845 ** of the sqlite library, then this function is called directly by
136847 ** function is called by the sqlite3_extension_init() entry point.
136995 ** This function assumes that pList points to a buffer allocated using
136996 ** sqlite3_malloc(). This function takes responsibility for eventually
137092 ** This function is called on each phrase after the position lists for
137202 ** This function is called for each Fts3Phrase in a full-text query
137204 ** function has been called successfully on an Fts3Phrase, it may be
137262 ** This function is used to iterate backwards (from the end to start)
137269 ** function iterates from the end of the doclist to the beginning.
137603 ** If *pRc is not SQLITE_OK when this function is called, it is a no-op.
137614 ** If an error occurs within this function, *pRc is set to an SQLite error
137664 ** This function is used to populate an allocated Fts3TokenAndCost array.
137666 ** If *pRc is not SQLITE_OK when this function is called, it is a no-op.
137772 ** This function is called to select the tokens (if any) that will be
137776 ** This function is called once for each AND/NEAR cluster in the
137907 ** This function is called from within the xFilter method. It initializes
137978 ** This function is called to edit the position list associated with
137985 ** the example above). When this function is called, *paPoslist points to
138033 ** This function is a no-op if *pRc is other than SQLITE_OK when it is called.
138052 ** It says above that this function advances the expression to the next
138201 ** cluster, then this function returns 1 immediately.
138290 ** This function is a helper function for fts3EvalTestDeferredAndNear().
138295 ** If *pRc is not SQLITE_OK when this function is called, it is a no-op.
138296 ** If an error occurs during execution of this function, *pRc is set to
138388 ** This function is called as the second part of each xNext operation when
138398 ** If *pRc is not SQLITE_OK when this function is called, it immediately
138403 ** 1. *pRc is SQLITE_OK when this function returns, and
138478 ** If *pRc is other than SQLITE_OK when this function is called, it is
138479 ** a no-op. If an error occurs within this function, *pRc is set to an
138520 ** by pExpr, calling this function for each row. This function increments
138560 ** If it is not already allocated and populated, this function allocates and
138651 ** This function is used by the matchinfo() module to query a phrase
138710 ** The expression pExpr passed as the second argument to this function
138725 ** This function works regardless of whether or not the phrase is deferred,
138941 ** This function does all the work for both the xConnect and xCreate methods.
139012 ** This function does the work for both the xDisconnect and xDestroy methods.
139526 ** This variable is used by function getNextNode(). When getNextNode() is
139546 ** This function is equivalent to the standard isspace() function.
139599 ** Function getNextNode(), which is called by fts3ExprParse(), may itself
139706 ** is included in the buffer. This function attempts to tokenize the entire
140015 ** inserted into the tree. This function adds pNew, which is always a binary
140042 ** Parse the fts3 query expression found in buffer z, length n. This function
140216 ** This function attempts to transform the expression tree at (*pp) to
140364 ** This function is similar to sqlite3Fts3ExprParse(), with the following
140415 ** an fts3 query expression, respectively. This function attempts to parse the
140491 ** This function would be simpler if it recursively called itself. But
140526 ** Function to query the hash-table of tokenizers (see README.tokenizers).
140607 ** This is the implementation of a scalar SQL function used to test the
140707 ** Register the query expression parser test function fts3_exprtest()
140853 ** Return a pointer to the appropriate hash function given the key class.
140855 ** The C syntax in this function definition may be unfamilar to some
140858 ** The name of the function is "ftsHashFunction". The function takes a
140860 ** is a pointer to another function. Specifically, the return value
140861 ** of ftsHashFunction() is a pointer to a function that takes two parameters
140874 ** Return a pointer to the appropriate hash function given the key class.
140876 ** For help in interpreted the obscure C code in the function definition,
140877 ** see the header comment on the previous function.
140923 int (*xHash)(const void*,int); /* The hash function */
140940 /* This function (for internal use only) locates an element in an
140952 int (*xCompare)(const void*,int,const void*,int); /* comparison function */
141012 int (*xHash)(const void*,int); /* The hash function */
141046 ** If the "data" parameter to this function is NULL, then the
141059 int (*xHash)(const void*,int); /* The hash function */
141805 ** Implementation of the SQL scalar function for accessing the underlying
141806 ** hash table. This function may be called as follows:
141808 ** SELECT <function-name>(<key-name>);
141809 ** SELECT <function-name>(<key-name>, <pointer>);
141811 ** where <function-name> is the name passed as the second argument
141812 ** to the sqlite3Fts3InitHashTable() function (e.g. 'fts3_tokenizer').
141988 ** Implementation of a special SQL scalar function for testing tokenizers
141990 ** function must be called with two or more arguments:
141992 ** SELECT <function-name>(<key-name>, ..., <input-string>);
141994 ** where <function-name> is the name passed as the second argument
141995 ** to the sqlite3Fts3InitHashTable() function (e.g. 'fts3_tokenizer')
142154 ** Implementation of the scalar function fts3_tokenizer_internal_test().
142155 ** This function is used for testing only, it is not included in the
142158 ** The purpose of this is to test that the fts3_tokenizer() function
142165 ** function with no arguments. An assert() will fail if a problem is
142184 /* Test the query function */
142194 /* Test the storage function */
142214 ** This function adds a scalar function (see header comment above
142220 ** The third argument to this function, zName, is used as the name
142601 ** strings. This function makes a copy of the array and strings into a
142652 ** This function does all the work for both the xConnect and xCreate methods.
142721 ** This function does the work for both the xDisconnect and xDestroy methods.
143057 ** incrementally. See function fts3PendingListAppend() for details.
143236 ** This function is used to obtain an SQLite prepared statement handle
143300 ** function sqlite3Fts3Incrmerge() for details. */
143467 ** This function ensures that the caller has obtained an exclusive
143505 ** in the %_segdir table on disk. This function is used to convert three
143590 ** This function also serves to allocate the PendingList structure itself.
143766 /* If the user has inserted a NULL value, this function may be called with
143816 ** Calling this function indicates that subsequent calls to
143863 ** This function is called by the xUpdate() method as part of an INSERT
143892 ** This function is called by the xUpdate() method for an INSERT operation.
144061 ** This function allocates a new level iLevel index in the segdir table.
144124 ** This function reads data from a single row of the %_segments table. The
144136 ** This function may leave an open sqlite3_blob* handle in the
144138 ** to this function. The handle may be closed by calling the
144139 ** sqlite3Fts3SegmentsClose() function. Reusing a blob handle is a handy
144143 ** method (xFilter etc.) that may directly or indirectly call this function
144198 ** the sqlite3Fts3ReadBlock() function for details.
144583 ** This is a comparison function used as a qsort() callback when sorting
144605 ** This function is used to allocate an Fts3SegReader that iterates through
144678 ** within this entire function, not just this "else{...}" block.
144742 ** A different comparison function for SegReader structures. In this
144807 ** (according to the comparison function provided). This function shuffles
144814 int (*xCmp)(Fts3SegReader *, Fts3SegReader *) /* Comparison function */
145049 ** Helper function for fts3NodeWrite().
145066 ** database. Then call this function recursively to write the parent of
145141 ** be passed NULL. This function will allocate a new SegmentWriter object
145284 ** database. This function must be called after all terms have been added
145335 ** This function tests if there exist any documents with docid values that
145400 ** the database. This function checks if it is the largest level number
145431 ** opened with seg-reader pSeg. This function does not affect the contents
145453 ** This function is used after merging multiple segments into a single large
145512 ** When this function is called, buffer *ppList (size *pnList bytes) contains
145514 ** function adjusts the pointer *ppList and the length *pnList so that they
145738 ** This function is called on a MultiSegReader that has been started using
145740 ** have been made. Calling this function puts the MultiSegReader in such
146104 ** If this function is called with iLevel<0, but there is only one
146430 ** This function is called when the user executes the following statement:
146514 ** This function opens a cursor used to read the input data for an
146572 ** The function blobGrowBuffer() is used to extend the allocation.
146627 ** If *pRc is not SQLITE_OK when this function is called, it is a no-op.
146724 ** This function is called while writing an FTS segment each time a leaf o
146731 ** (pWriter->aNodeWriter[0].iBlock) when this function is called.
146813 ** header must be written before this function is called.
146824 ** previous term. Before this function returns, it is updated to contain a
146829 ** is extended by this function if requrired.
146957 ** This function is called to release all dynamic resources held by the
146961 ** If *pRc is not SQLITE_OK when this function is called, then no attempt
146962 ** is made to write any data to disk. Instead, this function serves only
147102 ** This function is called when initializing an incremental-merge operation.
147453 ** This function creates a new node image in blob object *pNew by copying
147588 ** This function is called after an incrmental-merge operation has run to
147699 ** If *pRc is not SQLITE_OK when this function is called, it is a no-op.
147991 ** arguments to this function.
148267 ** (allocated) by the sqlite3Fts3CacheDeferredDoclists() function.
148448 ** This function does the work for the xUpdate method of FTS3 virtual
148546 ** function) will return SQLITE_MISMATCH. If fts3DeleteByRowid is
148709 ** accumulating the data returned by the matchinfo() function.
148736 ** This function is used to help iterate through a position-list. A position
148750 ** When this function is called, *pp points to the start of an element of
148762 ** Helper function for fts3ExprIterate() (see below).
148767 int (*x)(Fts3Expr*,int,void*), /* Callback function to invoke for phrases */
148789 ** For each phrase node found, the supplied callback function is invoked.
148791 ** If the callback function returns anything other than SQLITE_OK,
148798 int (*x)(Fts3Expr*,int,void*), /* Callback function to invoke for phrases */
148982 ** This function is an fts3ExprIterate() callback used by fts3BestSnippet().
149146 ** The fts3BestSnippet() function often selects snippets that end with a
149153 ** This function "shifts" the beginning of the snippet forward in the
149345 ** This function is used to count the entries in a column-list (a
149347 ** row). When this function is called, *ppCollist should point to the
149382 ** function populates Matchinfo.aMatchinfo[] as follows:
149611 ** This function implements the FTS3_MATCHINFO_LCS matchinfo() flag.
149690 ** be returned by the matchinfo() function. Argument zArg contains the
149814 const char *zArg /* Second argument to matchinfo() function */
149836 ** matchinfo function has been called for this query. In this case
149878 ** Implementation of snippet() function.
149881 sqlite3_context *pCtx, /* SQLite function call context */
149931 ** If the iCol argument to this function was negative, this means all
149997 ** This function is an fts3ExprIterate() callback used by sqlite3Fts3Offsets().
150026 ** Implementation of offsets() function.
150029 sqlite3_context *pCtx, /* SQLite function call context */
150164 ** Implementation of matchinfo() function.
150167 sqlite3_context *pContext, /* Function call context */
150169 const char *zArg /* Second arg to matchinfo() function */
150327 ** For each codepoint in the zIn/nIn string, this function checks if the
150328 ** sqlite3FtsUnicodeIsalnum() function already returns the desired result.
150631 ** The results are undefined if the value passed to this function
150637 ** codepoints for which this function should return 0).
150832 ** The results are undefined if the value passed to this function
151293 ** SQL function was created using sqlite3_rtree_geometry_callback() or
151323 int nParam; /* Number of parameters to the SQL function */
151324 RtreeDValue aParam[1]; /* Values for parameters to the SQL function */
151718 /* Forward declaration for the function that does the work of
152439 ** This function is called to configure the RtreeConstraint object passed
152441 ** first argument to this function is the right-hand operand to the MATCH
152445 RtreeMatchArg *pBlob; /* BLOB returned by geometry function */
152447 int nBlob; /* Size of the geometry function blob */
152552 ** an sqlite3_rtree_geometry_callback() SQL user function.
152594 ** support estimatedRows. In that case this function is a no-op.
152810 ** This function implements the ChooseLeaf algorithm from Gutman[84].
152870 ** the node pNode. This function updates the bounding box cells in
152925 ** (nIdx-1) in no particular order. This function sorts the values
152932 ** this function sets the aIdx array to contain:
152997 ** (nIdx-1) in no particular order. This function sorts the values
153326 ** function is called to determine its ancestry.
153490 ** relinquished before this function returns.
153913 ** This function populates the pRtree->nRowEst variable with an estimate
153968 0, /* xFindFunction - function overloading */
154050 ** The second argument to this function contains the text of an SQL statement
154072 ** This function is called from within the xConnect() or xCreate() method to
154077 ** If this function is being called as part of an xConnect(), then the rtree
154122 ** This function is the implementation of both the xConnect and xCreate
154222 ** Implementation of a scalar function that decodes r-tree nodes to
154225 ** The scalar function takes two arguments: (1) the number of dimensions
154282 /* This routine implements an SQL function that returns the "depth" parameter
154306 ** function "rtreenode".
154337 ** the corresponding SQL function is deleted.
154348 ** scalar function that is implemented by this routine.
154350 ** All this function does is construct an RtreeMatchArg object that
154352 ** parameters to this function, then return that RtreeMatchArg object
154385 ** Register a new geometry function for use with the r-tree MATCH operator.
154388 sqlite3 *db, /* Register SQL function on this connection */
154389 const char *zGeom, /* Name of the new SQL function */
154393 RtreeGeomCallback *pGeomCtx; /* Context object for new user-function */
154408 ** Register a new 2nd-generation geometry function for use with the
154412 sqlite3 *db, /* Register SQL function on this connection */
154413 const char *zQueryFunc, /* Name of new SQL function */
154418 RtreeGeomCallback *pGeomCtx; /* Context object for new user-function */
154468 ** * An implementation of the SQL regexp() function (and hence REGEXP
154504 ** Version of sqlite3_free() that is always a function, never a macro.
154594 ** Implementation of the like() SQL function. This function implements
154595 ** the build-in LIKE operator. The first argument to the function is the
154646 ** This function is called when an ICU function called from within
154647 ** the implementation of an SQL scalar function returns an error.
154649 ** The scalar function context passed as the first argument is
154653 sqlite3_context *pCtx, /* SQLite scalar function context */
154654 const char *zName, /* Name of ICU function that failed */
154655 UErrorCode e /* Error code returned by ICU function */
154664 ** Function to delete compiled regexp objects. Registered as
154665 ** a destructor function with sqlite3_set_auxdata().
154673 ** Implementation of SQLite REGEXP operator. This scalar function takes
154679 ** SQLite maps the regexp() function to the regexp() operator such
154740 ** pointer after this function returns.
154750 ** lower(). Function upper() converts its input to upper-case (ABC).
154751 ** Function lower() converts to lower-case (abc).
154815 ** Collation sequence destructor function. The pCtx argument points to
154824 ** Collation sequence comparison function. The pCtx argument points to
154847 ** Implementation of the scalar function icu_load_collation().
154849 ** This scalar function is used to add ICU collation based collation
154891 sqlite3_result_error(p, "Error registering collation function", -1);
154900 const char *zName; /* Function name */