Lines Matching defs:pVtab
7417 int (*xFindFunction)(sqlite3_vtab *pVtab, int nArg, const char *zName,
7420 int (*xRename)(sqlite3_vtab *pVtab, const char *zNew);
7736 sqlite3_vtab *pVtab; /* Virtual table of this cursor */
15899 VTable *pVtab; /* Used when p4type is P4_VTAB */
17733 sqlite3_vtab *pVtab; /* Pointer to vtab instance */
84360 sqlite3_vtab *pVtab = pOp->p4.pVtab->pVtab;
84361 sqlite3_str_appendf(&x, "vtab:%p", pVtab);
85156 const sqlite3_module *pModule = pVCur->pVtab->pModule;
85157 assert( pVCur->pVtab->nRef>0 );
85158 pVCur->pVtab->nRef--;
87756 SQLITE_PRIVATE void sqlite3VtabImportErrmsg(Vdbe *p, sqlite3_vtab *pVtab){
87757 if( pVtab->zErrMsg ){
87760 p->zErrMsg = sqlite3DbStrDup(db, pVtab->zErrMsg);
87761 sqlite3_free(pVtab->zErrMsg);
87762 pVtab->zErrMsg = 0;
96295 sqlite3_vtab *pVtab;
96311 pVtab = pC->uc.pVCur->pVtab;
96312 pModule = pVtab->pModule;
96315 sqlite3VtabImportErrmsg(p, pVtab);
98293 pVTab = pOp->p4.pVtab;
98295 if( pVTab ) sqlite3VtabImportErrmsg(p, pVTab->pVtab);
98356 sqlite3_vtab *pVtab;
98362 pVtab = pOp->p4.pVtab->pVtab;
98363 if( pVtab==0 || NEVER(pVtab->pModule==0) ){
98367 pModule = pVtab->pModule;
98368 rc = pModule->xOpen(pVtab, &pVCur);
98369 sqlite3VtabImportErrmsg(p, pVtab);
98373 pVCur->pVtab = pVtab;
98379 pVtab->nRef++;
98444 sqlite3_vtab *pVtab;
98458 pVtab = pVCur->pVtab;
98459 pModule = pVtab->pModule;
98472 sqlite3VtabImportErrmsg(p, pVtab);
98498 sqlite3_vtab *pVtab;
98513 pVtab = pCur->uc.pVCur->pVtab;
98514 pModule = pVtab->pModule;
98528 sqlite3VtabImportErrmsg(p, pVtab);
98550 sqlite3_vtab *pVtab;
98561 pVtab = pCur->uc.pVCur->pVtab;
98562 pModule = pVtab->pModule;
98572 sqlite3VtabImportErrmsg(p, pVtab);
98592 sqlite3_vtab *pVtab;
98598 pVtab = pOp->p4.pVtab->pVtab;
98600 assert( pVtab->pModule->xRename );
98610 rc = pVtab->pModule->xRename(pVtab, pName->z);
98612 sqlite3VtabImportErrmsg(p, pVtab);
98648 sqlite3_vtab *pVtab;
98662 pVtab = pOp->p4.pVtab->pVtab;
98663 if( pVtab==0 || NEVER(pVtab->pModule==0) ){
98667 pModule = pVtab->pModule;
98681 rc = pModule->xUpdate(pVtab, nArg, apArg, &rowid);
98683 sqlite3VtabImportErrmsg(p, pVtab);
98688 if( (rc&0xff)==SQLITE_CONSTRAINT && pOp->p4.pVtab->bConstraint ){
102646 static int bytecodevtabDisconnect(sqlite3_vtab *pVtab){
102647 bytecodevtab *p = (bytecodevtab*)pVtab;
102700 bytecodevtab *pTab = (bytecodevtab*)cur->pVtab;
102744 bytecodevtab *pVTab = (bytecodevtab*)cur->pVtab;
102864 bytecodevtab *pVTab = (bytecodevtab *)pVtabCursor->pVtab;
112520 if( pVTab->pVtab->pModule->xRename==0 ){
128851 if( pOp->opcode==OP_VOpen && pOp->p4.pVtab==pVTab ){
128852 assert( pOp->p4.pVtab!=0 );
136915 static int pragmaVtabDisconnect(sqlite3_vtab *pVtab){
136916 PragmaVtab *pTab = (PragmaVtab*)pVtab;
136965 static int pragmaVtabOpen(sqlite3_vtab *pVtab, sqlite3_vtab_cursor **ppCursor){
136970 pCsr->base.pVtab = pVtab;
137019 PragmaVtab *pTab = (PragmaVtab*)(pVtabCursor->pVtab);
137077 PragmaVtab *pTab = (PragmaVtab*)(pVtabCursor->pVtab);
150129 VTable *pVtab;
150131 for(pVtab=pTab->u.vtab.p; pVtab && pVtab->db!=db; pVtab=pVtab->pNext);
150132 return pVtab;
150149 sqlite3_vtab *p = pVTab->pVtab;
150549 rc = xConstruct(db, pMod->pAux, nArg, azArg, &pVTable->pVtab, &zErr);
150562 }else if( ALWAYS(pVTable->pVtab) ){
150565 memset(pVTable->pVtab, 0, sizeof(pVTable->pVtab[0]));
150566 pVTable->pVtab->pModule = pMod->pModule;
150689 /* Add pVtab to the end of sqlite3.aVTrans */
150849 assert( p->pVtab );
150850 if( p->pVtab->nRef>0 ){
150859 rc = xDestroy(p->pVtab);
150863 p->pVtab = 0;
150888 sqlite3_vtab *p = pVTab->pVtab;
150917 sqlite3_vtab *pVtab = aVTrans[i]->pVtab;
150918 if( pVtab && (x = pVtab->pModule->xSync)!=0 ){
150919 rc = x(pVtab);
150920 sqlite3VtabImportErrmsg(p, pVtab);
150946 ** If the virtual table pVtab supports the transaction interface
150968 pModule = pVTab->pVtab->pModule;
150973 /* If pVtab is already in the aVTrans array, return early */
150984 rc = pModule->xBegin(pVTab->pVtab);
150990 rc = pModule->xSavepoint(pVTab->pVtab, iSvpt-1);
151023 if( pVTab->pVtab && pMod->iVersion>=2 ){
151039 rc = xMethod(pVTab->pVtab, iSavepoint);
151068 sqlite3_vtab *pVtab;
151082 pVtab = sqlite3GetVTable(db, pTab)->pVtab;
151083 assert( pVtab!=0 );
151084 assert( pVtab->pModule!=0 );
151085 pMod = (sqlite3_module *)pVtab->pModule;
151104 rc = pMod->xFindFunction(pVtab, nArg, pDef->zName, &xSFunc, &pArg);
155110 sqlite3_vtab *pVtab;
155114 pVtab = sqlite3GetVTable(db, pCol->y.pTab)->pVtab;
155115 assert( pVtab!=0 );
155116 assert( pVtab->pModule!=0 );
155118 pMod = (sqlite3_module *)pVtab->pModule;
155120 i = pMod->xFindFunction(pVtab,2, pExpr->u.zToken, &xNotUsed, &pNotUsed);
157945 sqlite3_vtab *pVtab = sqlite3GetVTable(pParse->db, pTab)->pVtab;
157950 rc = pVtab->pModule->xBestIndex(pVtab, p);
157957 }else if( !pVtab->zErrMsg ){
157960 sqlite3ErrorMsg(pParse, "%s", pVtab->zErrMsg);
157963 sqlite3_free(pVtab->zErrMsg);
157964 pVtab->zErrMsg = 0;
180171 static int fts3DisconnectMethod(sqlite3_vtab *pVtab){
180172 Fts3Table *p = (Fts3Table *)pVtab;
180237 static int fts3DestroyMethod(sqlite3_vtab *pVtab){
180238 Fts3Table *p = (Fts3Table *)pVtab;
180261 return (rc==SQLITE_OK ? fts3DisconnectMethod(pVtab) : rc);
181407 Fts3Table *p = (Fts3Table *)pCsr->base.pVtab;
181437 assert( ((Fts3Table *)pCsr->base.pVtab)->pSegments==0 );
181439 assert( ((Fts3Table *)pCsr->base.pVtab)->pSegments==0 );
181456 Fts3Table *p = (Fts3Table *)pCsr->base.pVtab;
181486 Fts3Table *pTab = (Fts3Table*)pCsr->base.pVtab;
181496 if( rc==SQLITE_OK && ((Fts3Table *)pCsr->base.pVtab)->zContentTbl==0 ){
182752 Fts3Table *p = (Fts3Table *)pCsr->base.pVtab;
182891 Fts3Table *pTab = (Fts3Table*)pCursor->pVtab;
182904 assert( ((Fts3Table *)pCsr->base.pVtab)->pSegments==0 );
182949 Fts3Table *p = (Fts3Table *)pCursor->pVtab;
183099 Fts3Table *p = (Fts3Table *)pCursor->pVtab;
183137 assert( ((Fts3Table *)pCsr->base.pVtab)->pSegments==0 );
183147 sqlite3_vtab *pVtab, /* Virtual table handle */
183152 return sqlite3Fts3UpdateMethod(pVtab, nArg, apVal, pRowid);
183159 static int fts3SyncMethod(sqlite3_vtab *pVtab){
183182 Fts3Table *p = (Fts3Table*)pVtab;
183229 static int fts3BeginMethod(sqlite3_vtab *pVtab){
183230 Fts3Table *p = (Fts3Table*)pVtab;
183232 UNUSED_PARAMETER(pVtab);
183252 static int fts3CommitMethod(sqlite3_vtab *pVtab){
183253 TESTONLY( Fts3Table *p = (Fts3Table*)pVtab );
183254 UNUSED_PARAMETER(pVtab);
183267 static int fts3RollbackMethod(sqlite3_vtab *pVtab){
183268 Fts3Table *p = (Fts3Table*)pVtab;
183433 p = (Fts3Table *)pCursor->base.pVtab;
183475 sqlite3_vtab *pVtab, /* Virtual table handle */
183492 UNUSED_PARAMETER(pVtab);
183511 sqlite3_vtab *pVtab, /* Virtual table handle */
183514 Fts3Table *p = (Fts3Table *)pVtab;
183568 static int fts3SavepointMethod(sqlite3_vtab *pVtab, int iSavepoint){
183571 assert( ((Fts3Table *)pVtab)->inTransaction );
183572 assert( ((Fts3Table *)pVtab)->mxSavepoint <= iSavepoint );
183573 TESTONLY( ((Fts3Table *)pVtab)->mxSavepoint = iSavepoint );
183574 if( ((Fts3Table *)pVtab)->bIgnoreSavepoint==0 ){
183575 rc = fts3SyncMethod(pVtab);
183585 static int fts3ReleaseMethod(sqlite3_vtab *pVtab, int iSavepoint){
183586 TESTONLY( Fts3Table *p = (Fts3Table*)pVtab );
183588 UNUSED_PARAMETER(pVtab);
183600 static int fts3RollbackToMethod(sqlite3_vtab *pVtab, int iSavepoint){
183601 Fts3Table *p = (Fts3Table*)pVtab;
183914 Fts3Table *pTab = (Fts3Table *)pCsr->base.pVtab;
184064 Fts3Table *pTab = (Fts3Table *)pCsr->base.pVtab;
184336 Fts3Table *pTab = (Fts3Table *)pCsr->base.pVtab;
184437 Fts3Table *pTab = (Fts3Table *)pCsr->base.pVtab;
184590 Fts3Table *p = (Fts3Table*)pCsr->base.pVtab;
184643 Fts3Table *pTab = (Fts3Table *)pCsr->base.pVtab;
184771 Fts3Table *pTab = (Fts3Table *)pCsr->base.pVtab;
185428 Fts3Table *pTab = (Fts3Table *)pCsr->base.pVtab;
185537 Fts3Table *pTab = (Fts3Table *)pCsr->base.pVtab;
185587 Fts3Table *pTab = (Fts3Table *)pCsr->base.pVtab;
185888 static int fts3auxDisconnectMethod(sqlite3_vtab *pVtab){
185889 Fts3auxTable *p = (Fts3auxTable *)pVtab;
185996 Fts3Table *pFts3 = ((Fts3auxTable *)pCursor->pVtab)->pFts3Tab;
186029 Fts3Table *pFts3 = ((Fts3auxTable *)pCursor->pVtab)->pFts3Tab;
186133 Fts3Table *pFts3 = ((Fts3auxTable *)pCursor->pVtab)->pFts3Tab;
189649 static int fts3tokDisconnectMethod(sqlite3_vtab *pVtab){
189650 Fts3tokTable *pTab = (Fts3tokTable *)pVtab;
189709 Fts3tokTable *pTab = (Fts3tokTable *)(pCsr->base.pVtab);
189739 Fts3tokTable *pTab = (Fts3tokTable *)(pCursor->pVtab);
189768 Fts3tokTable *pTab = (Fts3tokTable *)(pCursor->pVtab);
191454 Fts3Table *p = (Fts3Table*)pCsr->base.pVtab;
195387 Fts3Table *p = (Fts3Table *)pCsr->base.pVtab;
195541 sqlite3_vtab *pVtab, /* FTS3 vtab object */
195546 Fts3Table *p = (Fts3Table *)pVtab;
196433 Fts3Table *pTab = (Fts3Table *)pCsr->base.pVtab;
196572 Fts3Table *pTab = (Fts3Table *)p->pCursor->base.pVtab;
196942 Fts3Table *pTab = (Fts3Table *)pCsr->base.pVtab;
197062 Fts3Table *pTab = (Fts3Table *)pCsr->base.pVtab;
197150 Fts3Table *pTab = (Fts3Table *)pCsr->base.pVtab;
197297 Fts3Table *pTab = (Fts3Table *)pCsr->base.pVtab;
197436 Fts3Table *pTab = (Fts3Table *)pCsr->base.pVtab;
200423 static int jsonEachDisconnect(sqlite3_vtab *pVtab){
200424 sqlite3_free(pVtab);
200771 sqlite3_free(cur->pVtab->zErrMsg);
200772 cur->pVtab->zErrMsg = sqlite3_mprintf("malformed JSON");
200773 if( cur->pVtab->zErrMsg ) rc = SQLITE_ERROR;
200796 sqlite3_free(cur->pVtab->zErrMsg);
200797 cur->pVtab->zErrMsg = jsonPathSyntaxError(zErr);
200799 return cur->pVtab->zErrMsg ? SQLITE_ERROR : SQLITE_NOMEM;
201244 #define RTREE_OF_CURSOR(X) ((Rtree*)((X)->base.pVtab))
201982 static int rtreeDisconnect(sqlite3_vtab *pVtab){
201983 rtreeRelease((Rtree *)pVtab);
201990 static int rtreeDestroy(sqlite3_vtab *pVtab){
201991 Rtree *pRtree = (Rtree *)pVtab;
202026 pCsr->base.pVtab = pVTab;
202040 Rtree *pRtree = (Rtree *)(pCsr->base.pVtab);
202059 pCsr->base.pVtab = (sqlite3_vtab*)pRtree;
202068 Rtree *pRtree = (Rtree *)(cur->pVtab);
202669 Rtree *pRtree = (Rtree *)cur->pVtab;
202783 Rtree *pRtree = (Rtree *)pVtabCursor->pVtab;
204165 sqlite3_vtab *pVtab,
204170 Rtree *pRtree = (Rtree *)pVtab;
204312 static int rtreeBeginTransaction(sqlite3_vtab *pVtab){
204313 Rtree *pRtree = (Rtree *)pVtab;
204323 static int rtreeEndTransaction(sqlite3_vtab *pVtab){
204324 Rtree *pRtree = (Rtree *)pVtab;
204333 static int rtreeRename(sqlite3_vtab *pVtab, const char *zNewName){
204334 Rtree *pRtree = (Rtree *)pVtab;
204366 static int rtreeSavepoint(sqlite3_vtab *pVtab, int iSavepoint){
204367 Rtree *pRtree = (Rtree *)pVtab;
206697 Rtree *pRtree = (Rtree *)pVtabCursor->pVtab;
206876 Rtree *pRtree = (Rtree *)cur->pVtab;
206931 sqlite3_vtab *pVtab,
206936 Rtree *pRtree = (Rtree *)pVtab;
206969 pVtab->zErrMsg =
207068 sqlite3_vtab *pVtab,
214383 static int statDisconnect(sqlite3_vtab *pVtab){
214384 sqlite3_free(pVtab);
214480 pCsr->base.pVtab = pVTab;
214693 StatTable *pTab = (StatTable *)((sqlite3_vtab_cursor *)pCsr)->pVtab;
214756 StatTable *pTab = (StatTable *)pCursor->pVtab;
214922 StatTable *pTab = (StatTable*)(pCursor->pVtab);
215184 static int dbpageDisconnect(sqlite3_vtab *pVtab){
215185 sqlite3_free(pVtab);
215261 pCsr->base.pVtab = pVTab;
215310 DbpageTable *pTab = (DbpageTable *)pCursor->pVtab;
215394 sqlite3_vtab *pVtab,
215399 DbpageTable *pTab = (DbpageTable *)pVtab;
215456 sqlite3_free(pVtab->zErrMsg);
215457 pVtab->zErrMsg = sqlite3_mprintf("%s", zErr);
215465 static int dbpageBegin(sqlite3_vtab *pVtab){
215466 DbpageTable *pTab = (DbpageTable *)pVtab;
237156 static int fts5DisconnectMethod(sqlite3_vtab *pVtab){
237157 fts5FreeVtab((Fts5FullTable*)pVtab);
237164 static int fts5DestroyMethod(sqlite3_vtab *pVtab){
237165 Fts5Table *pTab = (Fts5Table*)pVtab;
237168 fts5FreeVtab((Fts5FullTable*)pVtab);
237513 if( pCsr->base.pVtab==(sqlite3_vtab*)pTab ) return SQLITE_OK;
237569 Fts5FullTable *pTab = (Fts5FullTable*)(pCsr->base.pVtab);
237614 Fts5FullTable *pTab = (Fts5FullTable*)(pCursor->pVtab);
237675 && pCsr->base.pVtab==(sqlite3_vtab*)pTab
237698 Fts5FullTable *pTab = (Fts5FullTable*)(pCsr->base.pVtab);
237755 Fts5Config *pConfig = ((Fts5Table*)pCursor->pVtab)->pConfig;
237763 pCursor->pVtab->zErrMsg = sqlite3_mprintf(
237925 Fts5FullTable *pTab = (Fts5FullTable*)(pCsr->base.pVtab);
237996 pCsr->base.pVtab->zErrMsg = sqlite3_mprintf(
238040 Fts5FullTable *pTab = (Fts5FullTable*)(pCursor->pVtab);
238288 Fts5FullTable *pTab = (Fts5FullTable*)(pCsr->base.pVtab);
238298 Fts5Table *pTab = (Fts5Table*)(pCsr->base.pVtab);
238445 sqlite3_vtab *pVtab, /* Virtual table handle */
238450 Fts5FullTable *pTab = (Fts5FullTable*)pVtab;
238458 assert( pVtab->zErrMsg==0 );
238570 static int fts5SyncMethod(sqlite3_vtab *pVtab){
238572 Fts5FullTable *pTab = (Fts5FullTable*)pVtab;
238584 static int fts5BeginMethod(sqlite3_vtab *pVtab){
238585 fts5CheckTransactionState((Fts5FullTable*)pVtab, FTS5_BEGIN, 0);
238586 fts5NewTransaction((Fts5FullTable*)pVtab);
238595 static int fts5CommitMethod(sqlite3_vtab *pVtab){
238596 UNUSED_PARAM(pVtab); /* Call below is a no-op for NDEBUG builds */
238597 fts5CheckTransactionState((Fts5FullTable*)pVtab, FTS5_COMMIT, 0);
238605 static int fts5RollbackMethod(sqlite3_vtab *pVtab){
238607 Fts5FullTable *pTab = (Fts5FullTable*)pVtab;
238622 return ((Fts5Table*)(pCsr->base.pVtab))->pConfig->nCol;
238631 Fts5FullTable *pTab = (Fts5FullTable*)(pCsr->base.pVtab);
238637 Fts5FullTable *pTab = (Fts5FullTable*)(pCsr->base.pVtab);
238648 Fts5Table *pTab = (Fts5Table*)(pCsr->base.pVtab);
238672 if( fts5IsContentless((Fts5FullTable*)(pCsr->base.pVtab))
238693 Fts5Config *pConfig = ((Fts5Table*)(pCsr->base.pVtab))->pConfig;
238743 int nCol = ((Fts5Table*)pCsr->base.pVtab)->pConfig->nCol;
238838 }else if( fts5IsOffsetless((Fts5Table*)pCsr->base.pVtab) ){
238875 Fts5FullTable *pTab = (Fts5FullTable*)(pCsr->base.pVtab);
239028 Fts5Config *pConfig = ((Fts5Table*)(pCsr->base.pVtab))->pConfig;
239060 Fts5Config *pConfig = ((Fts5Table*)(pCsr->base.pVtab))->pConfig;
239135 Fts5FullTable *pTab = (Fts5FullTable*)(pCsr->base.pVtab);
239139 rc = fts5OpenMethod(pCsr->base.pVtab, (sqlite3_vtab_cursor**)&pNew);
239144 pNew->base.pVtab = (sqlite3_vtab*)pTab;
239222 return (Fts5Table*)pCsr->base.pVtab;
239249 switch( ((Fts5Table*)(pCsr->base.pVtab))->pConfig->eDetail ){
239304 Fts5FullTable *pTab = (Fts5FullTable*)(pCursor->pVtab);
239353 sqlite3_vtab *pVtab, /* Virtual table handle */
239359 Fts5FullTable *pTab = (Fts5FullTable*)pVtab;
239378 sqlite3_vtab *pVtab, /* Virtual table handle */
239381 Fts5FullTable *pTab = (Fts5FullTable*)pVtab;
239395 static int fts5SavepointMethod(sqlite3_vtab *pVtab, int iSavepoint){
239397 fts5CheckTransactionState((Fts5FullTable*)pVtab, FTS5_SAVEPOINT, iSavepoint);
239398 return sqlite3Fts5FlushToDisk((Fts5Table*)pVtab);
239406 static int fts5ReleaseMethod(sqlite3_vtab *pVtab, int iSavepoint){
239408 fts5CheckTransactionState((Fts5FullTable*)pVtab, FTS5_RELEASE, iSavepoint);
239409 return sqlite3Fts5FlushToDisk((Fts5Table*)pVtab);
239417 static int fts5RollbackToMethod(sqlite3_vtab *pVtab, int iSavepoint){
239418 Fts5FullTable *pTab = (Fts5FullTable*)pVtab;
243597 static int fts5VocabDisconnectMethod(sqlite3_vtab *pVtab){
243598 Fts5VocabTable *pTab = (Fts5VocabTable*)pVtab;
243606 static int fts5VocabDestroyMethod(sqlite3_vtab *pVtab){
243607 Fts5VocabTable *pTab = (Fts5VocabTable*)pVtab;
243939 Fts5VocabTable *pTab = (Fts5VocabTable*)pCursor->pVtab;
244072 Fts5VocabTable *pTab = (Fts5VocabTable*)pCursor->pVtab;
244151 int eType = ((Fts5VocabTable*)(pCursor->pVtab))->eType;
244378 static int stmtDisconnect(sqlite3_vtab *pVtab){
244379 sqlite3_free(pVtab);