Lines Matching refs:vtab
18790 VtabCtx *pVtabCtx; /* Context for active vtab connect/create */
19429 sqlite3_vtab *pVtab; /* Pointer to vtab instance */
19480 char **azArg; /* 0: module 1: schema 2: vtab name 3...: args */
19482 } vtab;
20946 int nMaxArg; /* Max args to xUpdate and xFilter vtab methods */
24388 sqlite3_vtab_cursor *pVCur; /* CURTYPE_VTAB. Vtab cursor */
24745 Mem **apArg; /* Arguments xUpdate and xFilter vtab methods */
89703 sqlite3_str_appendf(&x, "vtab:%p", pVtab);
104868 if( pTab->u.vtab.p==0 ) break;
104869 pVtab = pTab->u.vtab.p->pVtab;
104875 sqlite3VtabLock(pTab->u.vtab.p);
104879 sqlite3VtabUnlock(pTab->u.vtab.p);
126535 char *vtab = (char *)sqlite3GetVTable(db, pParse->apVtabLock[i]);
126536 sqlite3VdbeAddOp4(v, OP_VBegin, 0, 0, 0, vtab, P4_VTAB);
128835 pMod = (Module*)sqlite3HashFind(&db->aModule, pTab->u.vtab.azArg[0]);
128856 pMod = (Module*)sqlite3HashFind(&db->aModule, pTab->u.vtab.azArg[0]);
132766 && pTab->u.vtab.p->eVtabRisk >
146730 const char *zMod = pTab->u.vtab.azArg[0];
146734 if( pTab->u.vtab.p==0 ) continue;
146735 pVTab = pTab->u.vtab.p->pVtab;
154816 && ALWAYS(pTab->u.vtab.p!=0)
154817 && pTab->u.vtab.p->eVtabRisk > ((db->flags & SQLITE_TrustedSchema)!=0)
161620 /************** Begin file vtab.c ********************************************/
161815 for(pVtab=pTab->u.vtab.p; pVtab && pVtab->db!=db; pVtab=pVtab->pNext);
161844 ** p->u.vtab.p list to the sqlite3.pDisconnect lists of their associated
161847 ** connection db is left in the p->u.vtab.p list.
161854 pVTable = p->u.vtab.p;
161855 p->u.vtab.p = 0;
161861 ** database connection that may have an entry in the p->u.vtab.p list.
161871 p->u.vtab.p = pRet;
161899 for(ppVTab=&p->u.vtab.p; *ppVTab; ppVTab=&(*ppVTab)->pNext){
161964 if( p->u.vtab.azArg ){
161966 for(i=0; i<p->u.vtab.nArg; i++){
161967 if( i!=1 ) sqlite3DbFree(db, p->u.vtab.azArg[i]);
161969 sqlite3DbFree(db, p->u.vtab.azArg);
161974 ** Add a new module argument to pTable->u.vtab.azArg[].
161985 nBytes = sizeof(char *)*(2+pTable->u.vtab.nArg);
161986 if( pTable->u.vtab.nArg+3>=db->aLimit[SQLITE_LIMIT_COLUMN] ){
161989 azModuleArg = sqlite3DbRealloc(db, pTable->u.vtab.azArg, nBytes);
161993 int i = pTable->u.vtab.nArg++;
161996 pTable->u.vtab.azArg = azModuleArg;
162023 assert( pTable->u.vtab.nArg==0 );
162040 if( pTable->u.vtab.azArg ){
162044 pTable->u.vtab.azArg[0], pParse->db->aDb[iDb].zDbSName);
162075 if( pTab->u.vtab.nArg<1 ) return;
162103 ** entry in the sqlite_schema table that was created for this vtab
162188 int nArg = pTab->u.vtab.nArg;
162195 azArg = (const char *const*)pTab->u.vtab.azArg;
162223 pTab->u.vtab.azArg[1] = db->aDb[iDb].zDbSName;
162251 /* Justification of ALWAYS(): A correct vtab constructor must allocate
162266 ** into the linked list headed by pTab->u.vtab.p. Then loop through the
162270 pVTable->pNext = pTab->u.vtab.p;
162271 pTab->u.vtab.p = pVTable;
162330 zMod = pTab->u.vtab.azArg[0];
162334 const char *zModule = pTab->u.vtab.azArg[0];
162397 assert( pTab && IsVirtual(pTab) && !pTab->u.vtab.p );
162400 zMod = pTab->u.vtab.azArg[0];
162553 && ALWAYS(pTab->u.vtab.p!=0)
162557 for(p=pTab->u.vtab.p; p; p=p->pNext){
162571 assert( pTab->u.vtab.p==p && p->pNext==0 );
162573 pTab->u.vtab.p = 0;
162689 /* Invoke the xBegin method. If successful, add the vtab to the
162896 assert( pTab->u.vtab.nArg==0 );
163002 /************** End of vtab.c ************************************************/
163183 } vtab;
163306 u8 eMatchOp; /* Op for vtab MATCH/LIKE/GLOB/REGEXP terms */
163674 #define WHERE_VIRTUALTABLE 0x00000400 /* WhereLoop.u.vtab is valid */
163882 pLoop->u.vtab.bIdxNumHex ? "0x%x:%s" : "%d:%s",
163883 pLoop->u.vtab.idxNum, pLoop->u.vtab.idxStr);
165248 if( SMASKBIT32(j) & pLoop->u.vtab.mHandleIn ){
165261 && pLoop->u.vtab.bOmitOffset
165271 sqlite3VdbeAddOp2(v, OP_Integer, pLoop->u.vtab.idxNum, iReg);
165277 pLoop->u.vtab.idxStr,
165278 pLoop->u.vtab.needFree ? P4_DYNAMIC : P4_STATIC);
165280 pLoop->u.vtab.needFree = 0;
165282 ** the u.vtab.idxStr. NULL it out to prevent a use-after-free */
165283 if( db->mallocFailed ) pLoop->u.vtab.idxStr = 0;
165291 if( j<16 && (pLoop->u.vtab.omitMask>>j)&1 ){
165296 && (SMASKBIT32(j) & pLoop->u.vtab.mHandleIn)==0
168607 u32 mHandleIn; /* Terms that vtab will handle as <col> IN (...) */
169987 SrcItem *pSrc, /* The FROM clause term that is the vtab */
170265 if( pTab->u.vtab.p->bAllSchemas ){
171055 if( p->u.vtab.idxStr ){
171057 p->u.vtab.idxNum, p->u.vtab.idxStr, p->u.vtab.omitMask);
171059 z = sqlite3_mprintf("(%d,%x)", p->u.vtab.idxNum, p->u.vtab.omitMask);
171109 if( (p->wsFlags & WHERE_VIRTUALTABLE)!=0 && p->u.vtab.needFree ){
171110 sqlite3_free(p->u.vtab.idxStr);
171111 p->u.vtab.needFree = 0;
171112 p->u.vtab.idxStr = 0;
171166 pFrom->u.vtab.needFree = 0;
172996 memset(&pNew->u.vtab, 0, sizeof(pNew->u.vtab));
173025 pNew->u.vtab.omitMask |= 1<<iTerm;
173030 pNew->u.vtab.bOmitOffset = 1;
173034 pNew->u.vtab.mHandleIn |= MASKBIT32(iTerm);
173078 pNew->u.vtab.idxNum = pIdxInfo->idxNum;
173079 pNew->u.vtab.needFree = pIdxInfo->needToFreeIdxStr;
173081 pNew->u.vtab.idxStr = pIdxInfo->idxStr;
173082 pNew->u.vtab.isOrdered = (i8)(pIdxInfo->orderByConsumed ?
173084 pNew->u.vtab.bIdxNumHex = (pIdxInfo->idxFlags&SQLITE_INDEX_SCAN_HEX)!=0;
173097 if( pNew->u.vtab.needFree ){
173098 sqlite3_free(pNew->u.vtab.idxStr);
173099 pNew->u.vtab.needFree = 0;
173281 pNew->u.vtab.needFree = 0;
173795 if( pLoop->u.vtab.isOrdered && pWInfo->pOrderBy==pOrderBy ){
174880 /* Treat a vtab scan as similar to a full-table scan */
186564 ** structure built up in pParse->pNewTable. The calling code (see vtab.c)
194303 ** as part of the vtab xCreate() method.
194799 sqlite3_vtab **ppVTab, /* Write the resulting vtab structure here */
194803 Fts3Table *p = 0; /* Pointer to allocated vtab */
195070 /* Fill in the zName and zDb fields of the vtab structure. */
199994 /* This vtab delivers always results in "ORDER BY term ASC" order. */
209676 sqlite3_vtab *pVtab, /* FTS3 vtab object */
231509 sqlite3 *db; /* Database connection that owns this vtab */
259839 /* "rank" function. Populated on demand from vtab.xColumn(). */
259949 /* The following assert() can fail if another vtab strikes an error
259951 ** having called xSavepoint() on this vtab. */
260023 sqlite3_vtab **ppVTab, /* Write the resulting vtab structure here */
260032 /* Allocate the new vtab object and parse the configuration */
267850 sqlite3_vtab **ppVTab, /* Write the resulting vtab structure here */
268548 sqlite3 *db; /* Database connection for this stmt vtab */