Lines Matching defs:context
684 ** in the context of the [database connection] passed in as its 1st
3588 ** ^The C argument is a copy of the context pointer passed in as the
3637 ** and context pointer P. ^If the X callback is
3653 ** ^The C argument is a copy of the context pointer.
4114 ** are not useful outside of that context.
4728 ** The context in which an SQL function executes is stored in an
5950 ** information can be used to pass a limited amount of context from
6010 ** [sqlite3_context | SQL function context] that is the first parameter
9482 ** it an array of void* context pointers. The first argument passed to
9490 ** multiple times, it is invoked once with the set of void* context pointers
9832 ** If this interface is invoked outside the context of an xConnect or
10083 ** The result of invoking this interface from any other context is
10156 ** The result of invoking these interfaces from any other context
12014 ** the table name as the second argument, and a copy of the context pointer
12513 ** argument passed is a copy of the supplied pIn context pointer. The second
12750 ** Return a copy of the context pointer the extension function was
12837 ** is invoked. The context and API objects passed to the callback
12862 ** single auxiliary data context.
17943 ** conflict resolution algorthm is required from context.
18702 ** A NameContext defines a context in which to resolve table and column
18703 ** names. The context consists of a list of tables (the pSrcList) field and
18711 ** context is searched first. If no match is found, the next outer
18712 ** context is checked. If there is still no match, the next context
18715 ** the context containing the match is incremented.
18731 NameContext *pNext; /* Next outer name context. NULL for outermost */
18732 int nRef; /* Number of names resolved by this context */
19091 ** An SQL parser context. A copy of this structure is passed through
19558 Parse *pParse; /* Parser context. */
19565 NameContext *pNC; /* Naming context */
19575 struct WindowRewrite *pRewrite; /* Window rewrite context */
19577 struct RenameCtx *pRename; /* RENAME COLUMN context */
19591 Parse *pParse; /* The parsing context. Error messages written here */
22717 #define MEM_Agg 0x8000 /* Mem.z points to an agg function context */
22766 ** The "context" argument for an installable function. A pointer to an
22781 Mem *pMem; /* Memory cell used to store aggregate context */
22782 Vdbe *pVdbe; /* The VM that owns this context */
22832 Parse *pParse; /* Parsing context used to create this Vdbe */
22916 ** Structure used to store the context required by the
23841 static int setDateTimeToCurrent(sqlite3_context *context, DateTime *p){
23842 p->iJD = sqlite3StmtCurrentTime(context);
23883 sqlite3_context *context,
23892 }else if( sqlite3StrICmp(zDate,"now")==0 && sqlite3NotPureFunc(context) ){
23893 return setDateTimeToCurrent(context, p);
24162 ** to context pCtx. If the error is an unrecognized modifier, no error is
24166 sqlite3_context *pCtx, /* Function context */
24441 sqlite3_context *context,
24451 if( !sqlite3NotPureFunc(context) ) return 1;
24452 return setDateTimeToCurrent(context, p);
24459 if( !z || parseDateOrTime(context, (char*)z, p) ){
24466 if( z==0 || parseModifier(context, (char*)z, n, p, i) ) return 1;
24485 sqlite3_context *context,
24490 if( isDate(context, argc, argv, &x)==0 ){
24492 sqlite3_result_double(context, x.iJD/86400000.0);
24503 sqlite3_context *context,
24508 if( isDate(context, argc, argv, &x)==0 ){
24510 sqlite3_result_int64(context, x.iJD/1000 - 21086676*(i64)10000);
24520 sqlite3_context *context,
24525 if( isDate(context, argc, argv, &x)==0 ){
24554 sqlite3_result_text(context, zBuf, 20, SQLITE_TRANSIENT);
24556 sqlite3_result_text(context, &zBuf[1], 19, SQLITE_TRANSIENT);
24567 sqlite3_context *context,
24572 if( isDate(context, argc, argv, &x)==0 ){
24586 sqlite3_result_text(context, zBuf, 8, SQLITE_TRANSIENT);
24596 sqlite3_context *context,
24601 if( isDate(context, argc, argv, &x)==0 ){
24620 sqlite3_result_text(context, zBuf, 11, SQLITE_TRANSIENT);
24622 sqlite3_result_text(context, &zBuf[1], 10, SQLITE_TRANSIENT);
24647 sqlite3_context *context,
24660 if( zFmt==0 || isDate(context, argc-1, argv+1, &x) ) return;
24661 db = sqlite3_context_db_handle(context);
24745 sqlite3ResultStrAccum(context, &sRes);
24754 sqlite3_context *context,
24759 timeFunc(context, 0, 0);
24768 sqlite3_context *context,
24773 dateFunc(context, 0, 0);
24782 sqlite3_context *context,
24787 datetimeFunc(context, 0, 0);
24804 sqlite3_context *context,
24809 char *zFormat = (char *)sqlite3_user_data(context);
24818 iT = sqlite3StmtCurrentTime(context);
24831 sqlite3_result_text(context, zBuf, -1, SQLITE_TRANSIENT);
31696 TreeView *pView, /* View context */
39683 afpLockingContext *context;
39688 context = (afpLockingContext *) pFile->lockingContext;
39689 if( context->reserved ){
39703 int lrc = afpSetLock(context->dbPath, pFile, RESERVED_BYTE, 1,1);
39707 lrc = afpSetLock(context->dbPath, pFile, RESERVED_BYTE, 1, 0);
39752 afpLockingContext *context = (afpLockingContext *) pFile->lockingContext;
39816 failed = afpSetLock(context->dbPath, pFile, PENDING_BYTE, 1, 1);
39838 lrc1 = afpSetLock(context->dbPath, pFile,
39844 lrc2 = afpSetLock(context->dbPath, pFile, PENDING_BYTE, 1, 0);
39873 failed = afpSetLock(context->dbPath, pFile, RESERVED_BYTE, 1,1);
39875 context->reserved = 1;
39884 if( !(failed = afpSetLock(context->dbPath, pFile, SHARED_FIRST +
39888 failed = afpSetLock(context->dbPath, pFile, SHARED_FIRST,
39890 if( failed && (failed2 = afpSetLock(context->dbPath, pFile,
39934 afpLockingContext *context = (afpLockingContext *) pFile->lockingContext;
39974 rc = afpSetLock(context->dbPath, pFile, SHARED_FIRST, SHARED_SIZE, 0);
39978 rc = afpSetLock(context->dbPath, pFile, sharedLockByte, 1, 1);
39984 rc = afpSetLock(context->dbPath, pFile, PENDING_BYTE, 1, 0);
39986 if( rc==SQLITE_OK && pFile->eFileLock>=RESERVED_LOCK && context->reserved ){
39987 rc = afpSetLock(context->dbPath, pFile, RESERVED_BYTE, 1, 0);
39989 context->reserved = 0;
40009 rc = afpSetLock(context->dbPath, pFile, sharedLockByte, 1, 0);
40031 ** Close a file & cleanup AFP specific locking context
42580 /* Cache zFilename in the locking context (AFP and dotlock override) for
44499 proxyLockingContext *pCtx; /* The locking context for the proxy lock */
44611 /* dot lock style uses the locking context to store the dot lock
44616 /* all other styles use the locking context to store the db file path */
44626 ** are preserved in the locking context so that they can be restored and
44693 ** switch the locking context and pMethod then return.
44901 /* restore the original locking context and pMethod then close it */
55935 u32 aWalData[WAL_SAVEPOINT_NDATA]; /* WAL savepoint context */
63993 Wal *pWal, /* The WAL context */
64042 Wal *pWal, /* The WAL context */
65409 WalIterator *pIter = 0; /* Wal iterator context */
68194 ** 0 or 1 parent pages. (In this context 'database page' refers
78866 IntegrityCk *pCheck, /* Integrity check context */
78895 IntegrityCk *pCheck, /* Integrity checking context */
80381 /* Exit the mutexes and free the backup context structure. */
80996 ** Memory cell pMem contains the context of an aggregate function.
81028 ** Memory cell pAccum contains the context of an aggregate function.
82287 Parse *pParse, /* Parse context */
82362 Parse *pParse, /* Parse context */
82407 Parse *pParse, /* Parse context */
82889 ** that describes the calling context of the function. 0 means a general
82896 Parse *pParse, /* Parsing context */
82902 int eCallCtx /* Calling context */
83556 ** context.
83879 Parse *pParse, /* Parsing context */
85016 Parse *pParse /* Parsing context */
88242 sqlite3_context *pCtx, /* Function context */
88769 ** If this routine is called from any context other than within the
88870 ** Create a new aggregate context for p and return a pointer to
88891 ** Allocate or return the aggregate context for a user function. A new
88892 ** context is allocated on the first call. Subsequent calls return the
88893 ** same context that was returned on prior calls.
88995 ** context.
100407 SortSubtask *pTask, /* Task context */
100501 SortSubtask *pTask, /* Task context */
100534 SortSubtask *pTask, /* Subtask context (for pKeyInfo) */
100561 SortSubtask *pTask, /* Subtask context (for pKeyInfo) */
100580 SortSubtask *pTask, /* Subtask context (for pKeyInfo) */
100622 SortSubtask *pTask, /* Subtask context (for pKeyInfo) */
101123 SortSubtask *pTask, /* Calling thread context */
101480 SortSubtask *pTask = 0; /* Thread context used to create new PMA */
102142 SortSubtask *pTask, /* Task context */
103744 Parse *pParse, /* Parsing context */
103864 Parse *pParse, /* Parsing context */
103908 Parse *pParse, /* The parsing context */
103912 NameContext *pNC, /* The name context used to resolve the name */
103929 assert( pNC ); /* the name context cannot be NULL. */
103968 /* Start at the inner-most context and move outward until a match is found */
104284 /* Advance to the next name context. The loop will exit when either
104301 ** fields are not changed in any context.
104472 ** NameContext *pNC, // The name context
104484 NameContext *pNC, /* The name context */
104990 Parse *pParse, /* Parsing context for error messages */
105032 Parse *pParse, /* Parsing context for error messages */
105038 NameContext nc; /* Name context for resolving pE */
105079 Parse *pParse, /* The error context into which to write the error */
105107 Parse *pParse, /* Parsing context. Leave error messages here */
105220 Parse *pParse, /* Parsing context. Leave error messages here */
105281 ** The Name context of the SELECT statement is pNC. zType is either
105298 NameContext *pNC, /* The name context of the SELECT statement */
105306 Parse *pParse; /* Parsing context */
105362 NameContext sNC; /* Name context of this SELECT */
105365 Parse *pParse; /* Parsing context */
105441 /* If the number of references to the outer context changed when
105444 ** but the innermost outer context object, as lookupName() increments
105446 ** context containing the column when it resolves a name. */
105454 /* Set up the local name-context to pass to sqlite3ResolveExprNames() to
105478 /* Add the output column list to the name-context before parsing the
105744 Parse *pParse, /* The parser context */
105746 NameContext *pOuterNC /* Name context for parent SELECT statement */
105778 Parse *pParse, /* Parsing context */
105785 NameContext sNC; /* Name context for pParse->pNewTable */
105911 const Parse *pParse, /* Parsing context */
105927 const Parse *pParse, /* Parsing context */
106195 Parse *pParse, /* The parsing (and code generating) context */
106306 Parse *pParse, /* Parsing context */
106390 Parse *pParse, /* Parse context */
106428 Parse *pParse, /* Code generator context */
106758 Parse *pParse, /* Parsing context */
106881 Parse *pParse, /* Parsing context */
106922 Parse *pParse, /* Parsing and code generating context */
107646 Parse *pParse, /* Parsing context */
107675 Parse *pParse, /* Parsing context */
107775 Parse *pParse, /* Parsing context */
107810 Parse *pParse, /* Parsing context */
108554 Parse *pParse, /* Parsing context */
108820 ** Expression pExpr is a vector that has been used in a context where
108865 Parse *pParse, /* Parsing context */
109229 Parse *pParse, /* Parsing and code generating context */
109543 Parse *pParse, /* The parsing context */
109568 Parse *pParse, /* Parsing context */
109594 Vdbe *v, /* Parsing context */
109650 Parse *pParse, /* Parsing and code generating context */
109739 Parse *pParse, /* Parsing context */
109859 Parse *pParse, /* The parsing context */
110707 Parse *pParse, /* Parsing context */
110859 Parse *pParse, /* Parsing context */
110934 Parse *pParse, /* Parsing and code generating context */
111534 const Parse *pParse,/* Parsing context */
112380 Parse *pParse, /* Parse context */
112451 Parse *pParse, /* Parser context. */
112620 Parse *pParse, /* Parsing context */
112918 Parse *pParse, /* Parsing context */
113029 ** The context of an ALTER TABLE RENAME COLUMN operation that gets passed
113379 ** adds context to the error message and then stores it in pCtx.
113501 ** is loaded into context object pCtx as the result.
113508 RenameCtx *pRename, /* Rename context */
113788 sqlite3_context *context,
113792 sqlite3 *db = sqlite3_context_db_handle(context);
113930 rc = renameEditSql(context, &sCtx, zSql, zNew, bQuote);
113935 sqlite3_result_value(context, argv[0]);
113937 renameColumnParseError(context, "", argv[1], argv[2], &sParse);
113939 sqlite3_result_error_code(context, rc);
114013 sqlite3_context *context,
114017 sqlite3 *db = sqlite3_context_db_handle(context);
114141 rc = renameEditSql(context, &sCtx, zInput, zNew, bQuote);
114145 sqlite3_result_value(context, argv[3]);
114147 renameColumnParseError(context, "", argv[1], argv[2], &sParse);
114149 sqlite3_result_error_code(context, rc);
114199 sqlite3_context *context,
114203 sqlite3 *db = sqlite3_context_db_handle(context);
114266 rc = renameEditSql(context, &sCtx, zInput, 0, 0);
114272 sqlite3_result_value(context, argv[1]);
114274 sqlite3_result_error_code(context, rc);
114312 sqlite3_context *context,
114316 sqlite3 *db = sqlite3_context_db_handle(context);
114356 sqlite3_result_int(context, 1);
114364 renameColumnParseError(context, zWhen, argv[2], argv[3],&sParse);
114387 sqlite3_context *context,
114391 sqlite3 *db = sqlite3_context_db_handle(context);
114430 sqlite3_result_text(context, zNew, -1, SQLITE_TRANSIENT);
114439 sqlite3_result_error_code(context, rc);
114773 Parse *pParse, /* Parsing context */
115007 sqlite3_context *context,
115016 sqlite3 *db = sqlite3_context_db_handle(context); /* Database connection */
115044 sqlite3_result_error_nomem(context);
115090 sqlite3_result_blob(context, p, sizeof(*p), statAccumDestructor);
115308 sqlite3_context *context,
115319 UNUSED_PARAMETER( context );
115378 sqlite3_result_int(context, p->current.anDLt[0]>0);
115420 sqlite3_context *context,
115478 sqlite3ResultStrAccum(context, &sStat);
115489 sqlite3_result_int64(context, pS->u.iRowid);
115491 sqlite3_result_blob(context, pS->u.aRowid, pS->nRowid,
115515 sqlite3ResultStrAccum(context, &sStat);
115577 Parse *pParse, /* Parser context */
116621 sqlite3_context *context,
116627 sqlite3 *db = sqlite3_context_db_handle(context);
116707 sqlite3_result_error(context, zErr, -1);
116834 sqlite3_result_error(context, zErrDyn, -1);
116837 if( rc ) sqlite3_result_error_code(context, rc);
116849 sqlite3_context *context,
116854 sqlite3 *db = sqlite3_context_db_handle(context);
116903 sqlite3_result_error(context, zErr, -1);
116911 Parse *pParse, /* The parser context */
117291 Parse *pParse, /* The parser context */
117327 Parse *pParse, /* The parser context */
117428 ** Push an authorization context. After this routine is called, the
117444 ** Pop an authorization context that was previously pushed
117507 Parse *pParse, /* Parsing context */
117543 Parse *pParse, /* Parsing context */
117748 ** code for the SQL statement given onto the end of the pParse context
117891 Parse *pParse, /* context in which to report errors */
118155 Parse *pParse, /* Parsing context */
118461 Parse *pParse, /* Parsing and code generating context */
118516 Parse *pParse, /* Parsing context */
118685 Parse *pParse, /* Parser context */
119205 Parse *pParse, /* Parsing context */
119305 Parse *pParse, /* Parsing context */
119382 Parse *pParse, /* Parsing context */
120089 Parse *pParse, /* Parse context */
120431 Parse *pParse, /* The parsing context */
120801 Parse *pParse, /* The parsing context */
120894 ** context.
121052 Parse *pParse, /* Parsing context */
122226 Parse *pParse, /* Parsing context into which errors are reported */
122315 Parse *pParse, /* Parsing context, in which errors are reported */
122416 Parse *pParse, /* Parsing context */
122788 Parse *pParse, /* Parsing context */
122810 Parse *pParse, /* Parsing context */
122846 Parse *pParse, /* Parsing context */
123046 Parse *pParse, /* Parsing context */
123097 Parse *pParse, /* Parsing context */
123360 Parse *pParse, /* Parsing context */
123836 Parse *pParse, /* Parsing context */
123875 Parse *pParse, /* The parser context */
123975 Parse *pParse, /* The parser context */
123991 AuthContext sContext; /* Authorization context */
123992 NameContext sNC; /* Name context to resolve expressions in */
124095 /* Start the view context
124431 Parse *pParse, /* Parsing context */
124583 Parse *pParse, /* Parsing and code generating context */
124648 Parse *pParse, /* Parsing context */
124743 static CollSeq *sqlite3GetFuncCollSeq(sqlite3_context *context){
124745 assert( context->pVdbe!=0 );
124746 pOp = &context->pVdbe->aOp[context->iOp-1];
124756 static void sqlite3SkipAccumulatorLoad(sqlite3_context *context){
124757 assert( context->isError<=0 );
124758 context->isError = -1;
124759 context->skipFlag = 1;
124766 sqlite3_context *context,
124776 mask = sqlite3_user_data(context)==0 ? 0 : -1;
124777 pColl = sqlite3GetFuncCollSeq(context);
124789 sqlite3_result_value(context, argv[iBest]);
124796 sqlite3_context *context,
124813 sqlite3_result_text(context, azType[i], -1, SQLITE_STATIC);
124821 sqlite3_context *context,
124826 sqlite3_result_int(context, sqlite3_value_subtype(argv[0]));
124833 sqlite3_context *context,
124843 sqlite3_result_int(context, sqlite3_value_bytes(argv[0]));
124858 sqlite3_result_int(context, (int)(z-z0));
124862 sqlite3_result_null(context);
124874 static void absFunc(sqlite3_context *context, int argc, sqlite3_value **argv){
124885 sqlite3_result_error(context, "integer overflow", -1);
124890 sqlite3_result_int64(context, iVal);
124895 sqlite3_result_null(context);
124906 sqlite3_result_double(context, rVal);
124924 sqlite3_context *context,
124978 sqlite3_result_int(context, N);
124984 sqlite3_result_error_nomem(context);
124992 sqlite3_context *context,
125000 sqlite3 *db = sqlite3_context_db_handle(context);
125010 sqlite3_result_text(context, sqlite3StrAccumFinish(&str), n,
125028 sqlite3_context *context,
125077 p2 = sqlite3_context_db_handle(context)->aLimit[SQLITE_LIMIT_LENGTH];
125107 sqlite3_result_text64(context, (char*)z, z2-z, SQLITE_TRANSIENT,
125114 sqlite3_result_blob64(context, (char*)&z[p1], (u64)p2, SQLITE_TRANSIENT);
125122 static void roundFunc(sqlite3_context *context, int argc, sqlite3_value **argv){
125146 sqlite3_result_error_nomem(context);
125152 sqlite3_result_double(context, r);
125163 static void *contextMalloc(sqlite3_context *context, i64 nByte){
125165 sqlite3 *db = sqlite3_context_db_handle(context);
125170 sqlite3_result_error_toobig(context);
125175 sqlite3_result_error_nomem(context);
125184 static void upperFunc(sqlite3_context *context, int argc, sqlite3_value **argv){
125194 z1 = contextMalloc(context, ((i64)n)+1);
125199 sqlite3_result_text(context, z1, n, sqlite3_free);
125203 static void lowerFunc(sqlite3_context *context, int argc, sqlite3_value **argv){
125213 z1 = contextMalloc(context, ((i64)n)+1);
125218 sqlite3_result_text(context, z1, n, sqlite3_free);
125237 sqlite3_context *context,
125255 sqlite3_result_int64(context, r);
125263 sqlite3_context *context,
125275 p = contextMalloc(context, n);
125278 sqlite3_result_blob(context, (char*)p, n, sqlite3_free);
125287 sqlite3_context *context,
125291 sqlite3 *db = sqlite3_context_db_handle(context);
125296 sqlite3_result_int64(context, sqlite3_last_insert_rowid(db));
125307 sqlite3_context *context,
125311 sqlite3 *db = sqlite3_context_db_handle(context);
125313 sqlite3_result_int64(context, sqlite3_changes64(db));
125321 sqlite3_context *context,
125325 sqlite3 *db = sqlite3_context_db_handle(context);
125329 sqlite3_result_int64(context, sqlite3_total_changes64(db));
125588 sqlite3_context *context,
125595 sqlite3 *db = sqlite3_context_db_handle(context);
125596 struct compareInfo *pInfo = sqlite3_user_data(context);
125606 sqlite3_result_int(context, 0);
125618 sqlite3_result_error(context, "LIKE or GLOB pattern too complex", -1);
125628 sqlite3_result_error(context,
125648 sqlite3_result_int(context,
125659 sqlite3_context *context,
125663 CollSeq *pColl = sqlite3GetFuncCollSeq(context);
125666 sqlite3_result_value(context, argv[0]);
125675 sqlite3_context *context,
125682 sqlite3_result_text(context, sqlite3_libversion(), -1, SQLITE_STATIC);
125691 sqlite3_context *context,
125698 sqlite3_result_text(context, sqlite3_sourceid(), -1, SQLITE_STATIC);
125707 sqlite3_context *context,
125712 UNUSED_PARAMETER(context);
125723 sqlite3_context *context,
125735 sqlite3_result_int(context, sqlite3_compileoption_used(zOptName));
125747 sqlite3_context *context,
125758 sqlite3_result_text(context, sqlite3_compileoption_get(n), -1, SQLITE_STATIC);
125842 static void quoteFunc(sqlite3_context *context, int argc, sqlite3_value **argv){
125844 sqlite3 *db = sqlite3_context_db_handle(context);
125849 sqlite3_result_text(context, sqlite3StrAccumFinish(&str), str.nChar,
125852 sqlite3_result_null(context);
125853 sqlite3_result_error_code(context, str.accError);
125862 sqlite3_context *context,
125868 if( z && z[0] ) sqlite3_result_int(context, sqlite3Utf8Read(&z));
125877 sqlite3_context *context,
125885 sqlite3_result_error_nomem(context);
125910 sqlite3_result_text64(context, (char*)z, zOut-z, sqlite3_free, SQLITE_UTF8);
125918 sqlite3_context *context,
125930 z = zHex = contextMalloc(context, ((i64)n)*2 + 1);
125938 sqlite3_result_text(context, zHex, n*2, sqlite3_free);
125946 sqlite3_context *context,
125956 rc = sqlite3_result_zeroblob64(context, n); /* IMP: R-00293-64994 */
125958 sqlite3_result_error_code(context, rc);
125969 sqlite3_context *context,
125984 sqlite3 *db = sqlite3_context_db_handle(context);
125995 || sqlite3_context_db_handle(context)->mallocFailed );
126000 sqlite3_result_value(context, argv[0]);
126011 zOut = contextMalloc(context, (i64)nOut);
126026 sqlite3_result_error_toobig(context);
126038 sqlite3_result_error_nomem(context);
126054 sqlite3_result_text(context, (char*)zOut, j, sqlite3_free);
126062 sqlite3_context *context,
126097 azChar = contextMalloc(context,
126111 flags = SQLITE_PTR_TO_INT(sqlite3_user_data(context));
126139 sqlite3_result_text(context, (char*)zIn, nIn, SQLITE_TRANSIENT);
126154 sqlite3_context *context,
126175 sqlite3_context *context,
126214 sqlite3_result_text(context, zResult, 4, SQLITE_TRANSIENT);
126218 sqlite3_result_text(context, "?000", 4, SQLITE_STATIC);
126227 static void loadExt(sqlite3_context *context, int argc, sqlite3_value **argv){
126230 sqlite3 *db = sqlite3_context_db_handle(context);
126237 sqlite3_result_error(context, "not authorized", -1);
126247 sqlite3_result_error(context, zErrMsg, -1);
126255 ** An instance of the following structure holds the context of a
126277 static void sumStep(sqlite3_context *context, int argc, sqlite3_value **argv){
126282 p = sqlite3_aggregate_context(context, sizeof(*p));
126299 static void sumInverse(sqlite3_context *context, int argc, sqlite3_value**argv){
126304 p = sqlite3_aggregate_context(context, sizeof(*p));
126324 static void sumFinalize(sqlite3_context *context){
126326 p = sqlite3_aggregate_context(context, 0);
126329 sqlite3_result_error(context,"integer overflow",-1);
126331 sqlite3_result_double(context, p->rSum);
126333 sqlite3_result_int64(context, p->iSum);
126337 static void avgFinalize(sqlite3_context *context){
126339 p = sqlite3_aggregate_context(context, 0);
126341 sqlite3_result_double(context, p->rSum/(double)p->cnt);
126344 static void totalFinalize(sqlite3_context *context){
126346 p = sqlite3_aggregate_context(context, 0);
126348 sqlite3_result_double(context, p ? p->rSum : (double)0);
126366 static void countStep(sqlite3_context *context, int argc, sqlite3_value **argv){
126368 p = sqlite3_aggregate_context(context, sizeof(*p));
126379 || p->n==sqlite3_aggregate_count(context) );
126382 static void countFinalize(sqlite3_context *context){
126384 p = sqlite3_aggregate_context(context, 0);
126385 sqlite3_result_int64(context, p ? p->n : 0);
126407 sqlite3_context *context,
126415 pBest = (Mem *)sqlite3_aggregate_context(context, sizeof(*pBest));
126419 if( pBest->flags ) sqlite3SkipAccumulatorLoad(context);
126423 CollSeq *pColl = sqlite3GetFuncCollSeq(context);
126432 max = sqlite3_user_data(context)!=0;
126437 sqlite3SkipAccumulatorLoad(context);
126440 pBest->db = sqlite3_context_db_handle(context);
126444 static void minMaxValueFinalize(sqlite3_context *context, int bValue){
126446 pRes = (sqlite3_value *)sqlite3_aggregate_context(context, 0);
126449 sqlite3_result_value(context, pRes);
126455 static void minMaxValue(sqlite3_context *context){
126456 minMaxValueFinalize(context, 1);
126461 static void minMaxFinalize(sqlite3_context *context){
126462 minMaxValueFinalize(context, 0);
126489 sqlite3_context *context,
126499 pGCC = (GroupConcatCtx*)sqlite3_aggregate_context(context, sizeof(*pGCC));
126501 sqlite3 *db = sqlite3_context_db_handle(context);
126560 sqlite3_context *context,
126568 pGCC = (GroupConcatCtx*)sqlite3_aggregate_context(context, sizeof(*pGCC));
126605 static void groupConcatFinalize(sqlite3_context *context){
126607 = (GroupConcatCtx*)sqlite3_aggregate_context(context, 0);
126609 sqlite3ResultStrAccum(context, &pGCC->str);
126616 static void groupConcatValue(sqlite3_context *context){
126618 = (GroupConcatCtx*)sqlite3_aggregate_context(context, 0);
126622 sqlite3_result_error_toobig(context);
126624 sqlite3_result_error_nomem(context);
126627 sqlite3_result_text(context, zText, pAccum->nChar, SQLITE_TRANSIENT);
126768 sqlite3_context *context,
126775 sqlite3_result_int64(context, sqlite3_value_int64(argv[0]));
126779 double (*x)(double) = (double(*)(double))sqlite3_user_data(context);
126780 sqlite3_result_double(context, x(sqlite3_value_double(argv[0])));
126806 sqlite3_context *context,
126836 switch( SQLITE_PTR_TO_INT(sqlite3_user_data(context)) ){
126849 sqlite3_result_double(context, ans);
126864 sqlite3_context *context,
126875 x = (double(*)(double))sqlite3_user_data(context);
126877 sqlite3_result_double(context, ans);
126886 sqlite3_context *context,
126900 x = (double(*)(double,double))sqlite3_user_data(context);
126902 sqlite3_result_double(context, ans);
126909 sqlite3_context *context,
126914 sqlite3_result_double(context, M_PI);
126923 sqlite3_context *context,
126934 sqlite3_result_int(context, x<0.0 ? -1 : x>0.0 ? +1 : 0);
127308 Parse *pParse, /* Parse context to store any error in */
127445 Parse *pParse, /* Parse context */
127596 Parse *pParse, /* Parsing and code generating context */
127672 Parse *pParse, /* Parse context */
128012 Parse *pParse, /* Parse context */
128215 Parse *pParse, /* Parse context */
128265 Parse *pParse, /* Parse context */
128333 Parse *pParse, /* Parse context */
128530 Parse *pParse, /* Parse context */
128881 Parse *pParse, /* Parsing context */
129005 Parse *pParse, /* Parsing context */
129181 Parse *pParse, /* Parser context */
129286 Parse *pParse, /* Parser context */
130269 Parse *pParse, /* The parser context */
131127 Parse *pParse, /* Parse context */
131155 Parse *pParse, /* The parser context */
131243 Parse *pParse, /* Parsing context */
131383 Parse *pParse, /* Parser context */
137166 InitData *pData, /* Initialization context */
137831 Parse sParse; /* Parsing context */
138333 Parse *pParse, /* Parsing context */
138898 Parse *pParse, /* Parser context */
139094 Parse *pParse, /* Parsing and code generating context */
139178 Parse *pParse, /* Parsing and code generating context */
139231 SortCtx *pSort, /* Sorter context */
139300 Parse *pParse, /* The parser context */
139789 Parse *pParse, /* Parsing context */
139864 Parse *pParse, /* Parsing context */
140255 Parse *pParse, /* Parser context */
140322 Parse *pParse, /* Parser context */
140415 Parse *pParse, /* Parsing context */
140615 ** Get a VDBE for the given parser context. Create a new one if necessary.
140804 Parse *pParse, /* Parsing context */
140958 Parse *pParse, /* Parsing context */
140980 Parse *pParse, /* Parsing context */
141053 Parse *pParse, /* Parsing context */
141439 Parse *pParse, /* Parsing context */
141647 Parse *pParse, /* Parsing context */
142001 Parse *pParse; /* The parsing context */
142209 Parse *pParse, /* Parse context */
142276 Parse *pParse, /* Parse context */
142477 Parse *pParse, /* Parsing context */
142923 Parse *pParse; /* Parsing context */
143146 Parse *pParse, /* The parsing context */
143293 Parse *pParse, /* Parse context (for malloc() and error reporting) */
143695 Parse *pParse, /* The parsing context */
144442 Parse *pParse, /* The parser context */
144444 NameContext *pOuterNC /* Name context for container */
144637 Parse *pParse, /* Parse context */
144896 Parse *pParse, /* The parser context */
145563 NameContext sNC; /* Name context for processing aggregate information */
146466 Parse *pParse, /* The parse context of the CREATE TRIGGER statement */
146673 Parse *pParse, /* Parser context */
146816 Parse *pParse, /* Parser context */
147125 Parse *pParse, /* Parse context */
147188 Parse *pParse, /* Parse context */
147215 Parse *pParse, /* The parsing context */
147254 Parse *pParse, /* Parsing context */
147274 Parse *pParse, /* Parsing context */
147317 Parse *pParse, /* Parse context */
147393 Parse *pParse, /* The parser context */
147492 ** Parse context structure pFrom has just been used to create a sub-vdbe
147513 Parse *pParse, /* Current parse context */
147523 NameContext sNC; /* Name context for sub-vdbe */
147526 Parse sSubParse; /* Parse context for sub-vdbe */
147546 /* Allocate and populate a new Parse context to use for coding the
147627 Parse *pParse, /* Current parse context */
147662 Parse *pParse, /* Parse context */
147734 Parse *pParse, /* Parse context */
147804 Parse *pParse, /* Parse context */
147860 Parse *pParse, /* The parsing context */
148028 Parse *pParse, /* Parse context */
148125 Parse *pParse, /* The parser context */
148157 AuthContext sContext; /* The authorization context */
148158 NameContext sNC; /* The name-context to resolve expressions in */
148288 /* Initialize the name-context */
148466 /* Start the view context. */
149025 Parse *pParse, /* The parsing context */
149282 Parse *pParse, /* The parsing context */
149446 Parse *pParse, /* The parsing and code-generating context */
149875 /* GetMeta() and UpdateMeta() cannot fail in this context because
149963 VtabCtx *pPrior; /* Parent context (if any) */
150323 Parse *pParse, /* Parsing context */
151650 WhereInfo *pWInfo; /* WHERE clause processing context */
151769 Parse *pParse; /* Parsing and code generating context */
151827 Parse *pParse, /* Parse context */
151833 const Parse *pParse, /* Parse context */
151852 Parse *pParse, /* Parsing context */
152048 Parse *pParse, /* Parse context */
152163 const Parse *pParse, /* Parse context */
152397 Parse *pParse, /* The parsing context */
152486 Parse *pParse, /* The parsing context */
152689 Parse *pParse, /* Parsing context */
152931 ** the parent context. Do not walk the function arguments in this case.
153075 WhereInfo *pWInfo, /* Where clause context */
153080 Parse *pParse = pWInfo->pParse; /* Parse context */
153190 Parse *pParse, /* Parsing context */
153243 Parse *pParse, /* Parsing context */
154870 Parse *pParse, /* Parsing and code generating context */
155049 sqlite3 *db, /* Parsing context */
155341 WhereInfo *pWInfo = pWC->pWInfo; /* WHERE clause processing context */
155342 Parse *pParse = pWInfo->pParse; /* Parser context */
155750 WhereInfo *pWInfo = pWC->pWInfo; /* WHERE clause processing context */
155761 Parse *pParse = pWInfo->pParse; /* Parsing context */
156349 WhereInfo *pWInfo /* The WHERE processing context */
156506 Parse *pParse, /* Parsing context */
156584 Parse *pParse; /* The parsing context */
157085 Parse *pParse, /* Parse context */
157138 Parse *pParse, /* Parsing context */
157218 Parse *pParse, /* Parsing context */
157371 Parse *pParse, /* The parsing context */
157615 Parse *pParse = pWInfo->pParse; /* Parsing context */
158240 Parse *pParse, /* Parsing & code generating context */
158352 Parse *pParse, /* Parsing & code generating context */
158533 Parse *pParse, /* Parsing & code generating context */
158597 Parse *pParse, /* Parsing & code generating context */
159261 Parse *pParse, /* Parsing context */
159340 WhereInfo *pWInfo = pBuilder->pWInfo; /* WHERE analyse context */
159341 Parse *pParse = pWInfo->pParse; /* Parsing context */
159342 sqlite3 *db = pParse->db; /* Database connection malloc context */
159856 WhereInfo *pWInfo, /* The WHERE clause context */
159928 WhereInfo *pWInfo; /* WHERE analysis context */
160551 WhereInfo *pWInfo; /* WHERE analysis context */
160552 Parse *pParse; /* The parsing context */
161332 Parse *pParse; /* Parsing context */
162172 Parse *pParse, /* The parser context */
164018 Parse *pParse, /* Parsing context */
164303 Parse *pParse, /* Parsing context */
164722 Parse *pParse; /* Parse context */
165904 Parse *pParse, /* Parse context */
165944 /* Fill in the context object */
167449 ** to revert to identifiers if they keyword does not apply in the context where
172739 Parse *pParentParse = 0; /* Outer parse context, if any */
175503 ** wrong context. The sqlite3_overload_function() API might construct
175509 sqlite3_context *context, /* The function calling context */
175513 const char *zName = (const char*)sqlite3_user_data(context);
175517 "unable to use function %s in the requested context", zName);
175518 sqlite3_result_error(context, zErr, -1);
176406 ** on the parsing context. As follows:
177766 ** Set the VDBE coverage callback function to xCallback with context
178634 /* This occurs when the array of context pointers that need to
178647 ** Instead, invoke the unlock-notify callback with the context
178649 ** begin accumulating any further context pointers without
178652 ** context pointers the application will receive two or more
178653 ** callbacks with smaller arrays of context pointers, which will
181280 ** function MATCH in the requested context" error. To discourage
181306 ** context" error.
183322 ** message is written to context pContext and SQLITE_ERROR returned. The
183326 sqlite3_context *pContext, /* SQL function call context */
183348 sqlite3_context *pContext, /* SQLite function call context */
183395 sqlite3_context *pContext, /* SQLite function call context */
183421 sqlite3_context *pContext, /* SQLite function call context */
183455 sqlite3_context *pContext, /* SQLite function call context */
186496 ParseContext *pParse, /* fts3 query parse context */
186595 ParseContext *pParse, /* fts3 query parse context */
186713 ParseContext *pParse, /* fts3 query parse context */
186932 ParseContext *pParse, /* fts3 query parse context */
187500 sqlite3_context *context,
187513 Fts3Hash *pHash = (Fts3Hash*)sqlite3_user_data(context);
187518 sqlite3_result_error(context,
187528 sqlite3_result_error_nomem(context);
187530 sqlite3_result_error(context, zErr, -1);
187541 sqlite3_result_error_nomem(context);
187563 sqlite3_result_error(context, "Error parsing expression", -1);
187565 sqlite3_result_error_nomem(context);
187567 sqlite3_result_text(context, zBuf, -1, SQLITE_TRANSIENT);
187581 sqlite3_context *context,
187585 fts3ExprTestCommon(0, context, argc, argv);
187588 sqlite3_context *context,
187592 fts3ExprTestCommon(1, context, argc, argv);
188703 static int fts3TokenizerEnabled(sqlite3_context *context){
188704 sqlite3 *db = sqlite3_context_db_handle(context);
188731 sqlite3_context *context,
188742 pHash = (Fts3Hash *)sqlite3_user_data(context);
188748 if( fts3TokenizerEnabled(context) || sqlite3_value_frombind(argv[1]) ){
188752 sqlite3_result_error(context, "argument type mismatch", -1);
188758 sqlite3_result_error(context, "out of memory", -1);
188761 sqlite3_result_error(context, "fts3tokenize disabled", -1);
188770 sqlite3_result_error(context, zErr, -1);
188775 if( fts3TokenizerEnabled(context) || sqlite3_value_frombind(argv[0]) ){
188776 sqlite3_result_blob(context, (void *)&pPtr, sizeof(pPtr), SQLITE_TRANSIENT);
188928 sqlite3_context *context,
188956 sqlite3_result_error(context, "insufficient arguments", -1);
188965 pHash = (Fts3Hash *)sqlite3_user_data(context);
188970 sqlite3_result_error(context, zErr2, -1);
189011 sqlite3_result_error(context, zErr, -1);
189013 sqlite3_result_text(context, Tcl_GetString(pRet), -1, SQLITE_TRANSIENT);
189090 sqlite3_context *context,
189097 sqlite3 *db = (sqlite3 *)sqlite3_user_data(context);
189113 if( fts3TokenizerEnabled(context) ){
189121 sqlite3_result_text(context, "ok", -1, SQLITE_STATIC);
195748 ** Used as an fts3ExprIterate() context when loading phrase doclists to
195792 ** This type is used as an fts3ExprIterate() context object while
196570 MatchInfo *p /* Matchinfo context */
196937 MatchInfo *pInfo, /* Matchinfo context object */
197142 sqlite3_context *pCtx, /* SQLite function call context */
197294 sqlite3_context *pCtx, /* SQLite function call context */
197432 sqlite3_context *pContext, /* Function call context */
198312 sqlite3_context *pCtx; /* Function context - put error messages here */
205216 RtreeCheck check; /* Common context for various routines */
205221 /* Initialize the context object */
205710 sqlite3_context *context,
205714 GeoPoly *p = geopolyFuncParam(context, argv[0], 0);
205716 sqlite3_result_blob(context, p->hdr,
205729 sqlite3_context *context,
205733 GeoPoly *p = geopolyFuncParam(context, argv[0], 0);
205735 sqlite3 *db = sqlite3_context_db_handle(context);
205743 sqlite3_result_text(context, sqlite3_str_finish(x), -1, sqlite3_free);
205755 sqlite3_context *context,
205761 p = geopolyFuncParam(context, argv[0], 0);
205763 sqlite3 *db = sqlite3_context_db_handle(context);
205780 sqlite3_result_text(context, sqlite3_str_finish(x), -1, sqlite3_free);
205802 sqlite3_context *context,
205806 GeoPoly *p = geopolyFuncParam(context, argv[0], 0);
205824 sqlite3_result_blob(context, p->hdr,
205860 sqlite3_context *context,
205864 GeoPoly *p = geopolyFuncParam(context, argv[0], 0);
205866 sqlite3_result_double(context, geopolyArea(p));
205885 sqlite3_context *context,
205889 GeoPoly *p = geopolyFuncParam(context, argv[0], 0);
205902 sqlite3_result_blob(context, p->hdr,
205934 sqlite3_context *context,
205949 sqlite3_result_error_nomem(context);
205962 sqlite3_result_blob(context, p->hdr, 4+8*n, SQLITE_TRANSIENT);
205977 sqlite3_context *context, /* For recording the error */
205993 p = geopolyFuncParam(context, pPoly, pRc);
206013 if( context ) sqlite3_result_error_nomem(context);
206048 sqlite3_context *context,
206052 GeoPoly *p = geopolyBBox(context, argv[0], 0, 0);
206054 sqlite3_result_blob(context, p->hdr,
206074 sqlite3_context *context,
206080 (void)geopolyBBox(context, argv[0], a, &rc);
206083 pBBox = (GeoBBox*)sqlite3_aggregate_context(context, sizeof(*pBBox));
206097 sqlite3_context *context
206101 pBBox = (GeoBBox*)sqlite3_aggregate_context(context, 0);
206103 p = geopolyBBox(context, 0, pBBox->a, 0);
206105 sqlite3_result_blob(context, p->hdr,
206158 sqlite3_context *context,
206162 GeoPoly *p1 = geopolyFuncParam(context, argv[0], 0);
206180 sqlite3_result_int(context, 1);
206182 sqlite3_result_int(context, 0);
206184 sqlite3_result_int(context, 2);
206201 sqlite3_context *context,
206205 GeoPoly *p1 = geopolyFuncParam(context, argv[0], 0);
206206 GeoPoly *p2 = geopolyFuncParam(context, argv[1], 0);
206210 sqlite3_result_error_nomem(context);
206212 sqlite3_result_int(context, x==2 ? 1 : x==4 ? 2 : 0);
206531 sqlite3_context *context,
206535 GeoPoly *p1 = geopolyFuncParam(context, argv[0], 0);
206536 GeoPoly *p2 = geopolyFuncParam(context, argv[1], 0);
206540 sqlite3_result_error_nomem(context);
206542 sqlite3_result_int(context, x);
206553 sqlite3_context *context,
207292 /* Allocate and populate the context object. */
207317 /* Allocate and populate the context object. */
207403 ** The scalar function context passed as the first argument is
207407 sqlite3_context *pCtx, /* SQLite scalar function context */
207560 sqlite3_context *context,
207572 sqlite3_result_error(context, "LIKE or GLOB pattern too complex", -1);
207587 sqlite3_result_error(context,
207594 sqlite3_result_int(context, icuLikeCompare(zA, zB, uEsc));
207857 unsigned char iContext; /* sqlite3_user_data() context */
209486 sqlite3_context *context,
209509 sqlite3_result_error(context, "corrupt fossil delta", -1);
209515 sqlite3_result_error_nomem(context);
209520 sqlite3_result_error(context, "corrupt fossil delta", -1);
209522 sqlite3_result_blob(context, aOut, nOut, sqlite3_free);
219485 SessionApplyCtx *p /* Session changeset-apply context */
219550 SessionApplyCtx *p /* Session changeset-apply context */
219568 SessionApplyCtx *p /* Session changeset-apply context */
219746 SessionApplyCtx *p, /* Apply context */
219821 SessionApplyCtx *p, /* changeset_apply() context */
219919 SessionApplyCtx *p, /* changeset_apply() context */
220053 SessionApplyCtx *pApply, /* Apply context */
220183 SessionApplyCtx sApply; /* changeset_apply() context object */
221411 ** Return a copy of the context pointer the extension function was
221498 ** is invoked. The context and API objects passed to the callback
221523 ** single auxiliary data context.
223103 ** to revert to identifiers if they keyword does not apply in the context where
226494 ** Parse context.
227029 Fts5PoslistWriter writer; /* Writer context */
227961 Fts5Parse *pParse, /* Parse context */
228140 Fts5Parse *pParse, /* Parse context */
228643 Fts5Parse *pParse, /* Parse context */
228725 Fts5Parse *pParse, /* Parse context */
229013 sqlite3_context *pCtx, /* Function call context */
229098 sqlite3_context *pCtx, /* Function call context */
229105 sqlite3_context *pCtx, /* Function call context */
229118 sqlite3_context *pCtx, /* Function call context */
229139 sqlite3_context *pCtx, /* Function call context */
230500 ** comparison in this context is the index of the iterator that currently
236545 sqlite3_context *pCtx, /* Function call context */
236756 sqlite3_context *pCtx, /* Function call context */
236922 Fts5Global *pGlobal; /* Global context for this function */
238927 Fts5Context *pCtx, /* Fts5 context */
239168 sqlite3_context *context,
239174 pAux->xFunc(&sFts5Api, (Fts5Context*)pCsr, context, argc, argv);
239187 sqlite3_context *context,
239197 pAux = (Fts5Auxiliary*)sqlite3_user_data(context);
239203 sqlite3_result_error(context, zErr, -1);
239206 fts5ApiInvoke(pAux, pCsr, context, argc-1, &argv[1]);
239216 Fts5Global *pGlobal, /* FTS5 global context for db handle */
239426 ** Register a new auxiliary function with global context pGlobal.
239429 fts5_api *pApi, /* Global context (one per db handle) */
239468 fts5_api *pApi, /* Global context (one per db handle) */
239524 fts5_api *pApi, /* Global context (one per db handle) */
239602 sqlite3_context *pCtx, /* Function call context */
239618 sqlite3_context *pCtx, /* Function call context */
240495 Fts5InsertCtx ctx; /* Tokenization callback context object */
244975 // This function will free all resources of key context, except it self.
245339 // You should clear key context before you call this function
245389 // This function will free all resources of codec context, except it self.
246101 void sqlite3CodecExportData(sqlite3_context *context, int argc, sqlite3_value **argv){
246102 sqlite3 *db = sqlite3_context_db_handle(context);
246210 sqlite3_result_error(context, errMsg, -1);
246213 sqlite3_result_error(context, sqlite3ErrStr(rc), -1);