Lines Matching refs:pVtab

7416   int (*xFindFunction)(sqlite3_vtab *pVtab, int nArg, const char *zName,
7419 int (*xRename)(sqlite3_vtab *pVtab, const char *zNew);
7674 sqlite3_vtab *pVtab; /* Virtual table of this cursor */ member
14731 VTable *pVtab; /* Used when p4type is P4_VTAB */ member
16871 sqlite3_vtab *pVtab; /* Pointer to vtab instance */ member
77866 sqlite3_vtab *pVtab = pOp->p4.pVtab->pVtab;
77867 sqlite3_str_appendf(&x, "vtab:%p", pVtab);
78612 const sqlite3_module *pModule = pVCur->pVtab->pModule;
78613 assert( pVCur->pVtab->nRef>0 );
78614 pVCur->pVtab->nRef--;
81194 SQLITE_PRIVATE void sqlite3VtabImportErrmsg(Vdbe *p, sqlite3_vtab *pVtab){
81195 if( pVtab->zErrMsg ){
81198 p->zErrMsg = sqlite3DbStrDup(db, pVtab->zErrMsg);
81199 sqlite3_free(pVtab->zErrMsg);
81200 pVtab->zErrMsg = 0;
88536 sqlite3_vtab *pVtab;
88552 pVtab = pC->uc.pVCur->pVtab;
88553 pModule = pVtab->pModule;
88556 sqlite3VtabImportErrmsg(p, pVtab);
90409 pVTab = pOp->p4.pVtab;
90411 if( pVTab ) sqlite3VtabImportErrmsg(p, pVTab->pVtab);
90472 sqlite3_vtab *pVtab;
90478 pVtab = pOp->p4.pVtab->pVtab;
90479 if( pVtab==0 || NEVER(pVtab->pModule==0) ){
90483 pModule = pVtab->pModule;
90484 rc = pModule->xOpen(pVtab, &pVCur);
90485 sqlite3VtabImportErrmsg(p, pVtab);
90489 pVCur->pVtab = pVtab;
90495 pVtab->nRef++;
90532 sqlite3_vtab *pVtab;
90545 pVtab = pVCur->pVtab;
90546 pModule = pVtab->pModule;
90560 sqlite3VtabImportErrmsg(p, pVtab);
90586 sqlite3_vtab *pVtab;
90600 pVtab = pCur->uc.pVCur->pVtab;
90601 pModule = pVtab->pModule;
90614 sqlite3VtabImportErrmsg(p, pVtab);
90639 sqlite3_vtab *pVtab;
90650 pVtab = pCur->uc.pVCur->pVtab;
90651 pModule = pVtab->pModule;
90661 sqlite3VtabImportErrmsg(p, pVtab);
90681 sqlite3_vtab *pVtab;
90687 pVtab = pOp->p4.pVtab->pVtab;
90689 assert( pVtab->pModule->xRename );
90699 rc = pVtab->pModule->xRename(pVtab, pName->z);
90701 sqlite3VtabImportErrmsg(p, pVtab);
90737 sqlite3_vtab *pVtab;
90751 pVtab = pOp->p4.pVtab->pVtab;
90752 if( pVtab==0 || NEVER(pVtab->pModule==0) ){
90756 pModule = pVtab->pModule;
90770 rc = pModule->xUpdate(pVtab, nArg, apArg, &rowid);
90772 sqlite3VtabImportErrmsg(p, pVtab);
90777 if( (rc&0xff)==SQLITE_CONSTRAINT && pOp->p4.pVtab->bConstraint ){
102510 if( pVTab->pVtab->pModule->xRename==0 ){
116643 if( pOp->opcode==OP_VOpen && pOp->p4.pVtab==pVTab ){
116644 assert( pOp->p4.pVtab!=0 );
123461 static int pragmaVtabDisconnect(sqlite3_vtab *pVtab){
123462 PragmaVtab *pTab = (PragmaVtab*)pVtab;
123511 static int pragmaVtabOpen(sqlite3_vtab *pVtab, sqlite3_vtab_cursor **ppCursor){
123516 pCsr->base.pVtab = pVtab;
123565 PragmaVtab *pTab = (PragmaVtab*)(pVtabCursor->pVtab);
123623 PragmaVtab *pTab = (PragmaVtab*)(pVtabCursor->pVtab);
134442 VTable *pVtab;
134444 for(pVtab=pTab->pVTable; pVtab && pVtab->db!=db; pVtab=pVtab->pNext);
134445 return pVtab;
134461 sqlite3_vtab *p = pVTab->pVtab;
134848 rc = xConstruct(db, pMod->pAux, nArg, azArg, &pVTable->pVtab, &zErr);
134861 }else if( ALWAYS(pVTable->pVtab) ){
134864 memset(pVTable->pVtab, 0, sizeof(pVTable->pVtab[0]));
134865 pVTable->pVtab->pModule = pMod->pModule;
135133 assert( p->pVtab );
135134 if( p->pVtab->nRef>0 ){
135141 rc = xDestroy(p->pVtab);
135145 p->pVtab = 0;
135169 sqlite3_vtab *p = pVTab->pVtab;
135198 sqlite3_vtab *pVtab = aVTrans[i]->pVtab;
135199 if( pVtab && (x = pVtab->pModule->xSync)!=0 ){
135200 rc = x(pVtab);
135201 sqlite3VtabImportErrmsg(p, pVtab);
135249 pModule = pVTab->pVtab->pModule;
135265 rc = pModule->xBegin(pVTab->pVtab);
135271 rc = pModule->xSavepoint(pVTab->pVtab, iSvpt-1);
135304 if( pVTab->pVtab && pMod->iVersion>=2 ){
135320 rc = xMethod(pVTab->pVtab, iSavepoint);
135349 sqlite3_vtab *pVtab;
135362 pVtab = sqlite3GetVTable(db, pTab)->pVtab;
135363 assert( pVtab!=0 );
135364 assert( pVtab->pModule!=0 );
135365 pMod = (sqlite3_module *)pVtab->pModule;
135384 rc = pMod->xFindFunction(pVtab, nArg, pDef->zName, &xSFunc, &pArg);
138836 sqlite3_vtab *pVtab;
138840 pVtab = sqlite3GetVTable(db, pCol->y.pTab)->pVtab;
138841 assert( pVtab!=0 );
138842 assert( pVtab->pModule!=0 );
138843 pMod = (sqlite3_module *)pVtab->pModule;
138845 i = pMod->xFindFunction(pVtab,2, pExpr->u.zToken, &xNotUsed, &pNotUsed);
141094 sqlite3_vtab *pVtab = sqlite3GetVTable(pParse->db, pTab)->pVtab;
141098 rc = pVtab->pModule->xBestIndex(pVtab, p);
141104 }else if( !pVtab->zErrMsg ){
141107 sqlite3ErrorMsg(pParse, "%s", pVtab->zErrMsg);
141110 sqlite3_free(pVtab->zErrMsg);
141111 pVtab->zErrMsg = 0;
160754 static int fts3DisconnectMethod(sqlite3_vtab *pVtab){
160755 Fts3Table *p = (Fts3Table *)pVtab;
160820 static int fts3DestroyMethod(sqlite3_vtab *pVtab){
160821 Fts3Table *p = (Fts3Table *)pVtab;
160844 return (rc==SQLITE_OK ? fts3DisconnectMethod(pVtab) : rc);
161968 Fts3Table *p = (Fts3Table *)pCsr->base.pVtab;
161998 assert( ((Fts3Table *)pCsr->base.pVtab)->pSegments==0 );
162000 assert( ((Fts3Table *)pCsr->base.pVtab)->pSegments==0 );
162017 Fts3Table *p = (Fts3Table *)pCsr->base.pVtab;
162049 if( rc==SQLITE_OK && ((Fts3Table *)pCsr->base.pVtab)->zContentTbl==0 ){
163284 Fts3Table *p = (Fts3Table *)pCsr->base.pVtab;
163433 assert( ((Fts3Table *)pCsr->base.pVtab)->pSegments==0 );
163490 Fts3Table *p = (Fts3Table *)pCursor->pVtab;
163632 Fts3Table *p = (Fts3Table *)pCursor->pVtab;
163670 assert( ((Fts3Table *)pCsr->base.pVtab)->pSegments==0 );
163680 sqlite3_vtab *pVtab, /* Virtual table handle */
163685 return sqlite3Fts3UpdateMethod(pVtab, nArg, apVal, pRowid);
163692 static int fts3SyncMethod(sqlite3_vtab *pVtab){
163715 Fts3Table *p = (Fts3Table*)pVtab;
163762 static int fts3BeginMethod(sqlite3_vtab *pVtab){
163763 Fts3Table *p = (Fts3Table*)pVtab;
163764 UNUSED_PARAMETER(pVtab);
163779 static int fts3CommitMethod(sqlite3_vtab *pVtab){
163780 TESTONLY( Fts3Table *p = (Fts3Table*)pVtab );
163781 UNUSED_PARAMETER(pVtab);
163794 static int fts3RollbackMethod(sqlite3_vtab *pVtab){
163795 Fts3Table *p = (Fts3Table*)pVtab;
163956 p = (Fts3Table *)pCursor->base.pVtab;
163998 sqlite3_vtab *pVtab, /* Virtual table handle */
164015 UNUSED_PARAMETER(pVtab);
164034 sqlite3_vtab *pVtab, /* Virtual table handle */
164037 Fts3Table *p = (Fts3Table *)pVtab;
164091 static int fts3SavepointMethod(sqlite3_vtab *pVtab, int iSavepoint){
164094 assert( ((Fts3Table *)pVtab)->inTransaction );
164095 assert( ((Fts3Table *)pVtab)->mxSavepoint <= iSavepoint );
164096 TESTONLY( ((Fts3Table *)pVtab)->mxSavepoint = iSavepoint );
164097 if( ((Fts3Table *)pVtab)->bIgnoreSavepoint==0 ){
164098 rc = fts3SyncMethod(pVtab);
164108 static int fts3ReleaseMethod(sqlite3_vtab *pVtab, int iSavepoint){
164109 TESTONLY( Fts3Table *p = (Fts3Table*)pVtab );
164111 UNUSED_PARAMETER(pVtab);
164123 static int fts3RollbackToMethod(sqlite3_vtab *pVtab, int iSavepoint){
164124 Fts3Table *p = (Fts3Table*)pVtab;
164430 Fts3Table *pTab = (Fts3Table *)pCsr->base.pVtab;
164577 Fts3Table *pTab = (Fts3Table *)pCsr->base.pVtab;
164848 Fts3Table *pTab = (Fts3Table *)pCsr->base.pVtab;
164949 Fts3Table *pTab = (Fts3Table *)pCsr->base.pVtab;
165102 Fts3Table *p = (Fts3Table*)pCsr->base.pVtab;
165154 Fts3Table *pTab = (Fts3Table *)pCsr->base.pVtab;
165282 Fts3Table *pTab = (Fts3Table *)pCsr->base.pVtab;
165935 Fts3Table *pTab = (Fts3Table *)pCsr->base.pVtab;
166043 Fts3Table *pTab = (Fts3Table *)pCsr->base.pVtab;
166093 Fts3Table *pTab = (Fts3Table *)pCsr->base.pVtab;
166391 static int fts3auxDisconnectMethod(sqlite3_vtab *pVtab){
166392 Fts3auxTable *p = (Fts3auxTable *)pVtab;
166499 Fts3Table *pFts3 = ((Fts3auxTable *)pCursor->pVtab)->pFts3Tab;
166532 Fts3Table *pFts3 = ((Fts3auxTable *)pCursor->pVtab)->pFts3Tab;
166632 Fts3Table *pFts3 = ((Fts3auxTable *)pCursor->pVtab)->pFts3Tab;
170142 static int fts3tokDisconnectMethod(sqlite3_vtab *pVtab){
170143 Fts3tokTable *pTab = (Fts3tokTable *)pVtab;
170202 Fts3tokTable *pTab = (Fts3tokTable *)(pCsr->base.pVtab);
170232 Fts3tokTable *pTab = (Fts3tokTable *)(pCursor->pVtab);
170261 Fts3tokTable *pTab = (Fts3tokTable *)(pCursor->pVtab);
171930 Fts3Table *p = (Fts3Table*)pCsr->base.pVtab;
175778 Fts3Table *p = (Fts3Table *)pCsr->base.pVtab;
175932 sqlite3_vtab *pVtab, /* FTS3 vtab object */
175937 Fts3Table *p = (Fts3Table *)pVtab;
176822 Fts3Table *pTab = (Fts3Table *)pCsr->base.pVtab;
176961 Fts3Table *pTab = (Fts3Table *)p->pCursor->base.pVtab;
177318 Fts3Table *pTab = (Fts3Table *)pCsr->base.pVtab;
177428 Fts3Table *pTab = (Fts3Table *)pCsr->base.pVtab;
177516 Fts3Table *pTab = (Fts3Table *)pCsr->base.pVtab;
177663 Fts3Table *pTab = (Fts3Table *)pCsr->base.pVtab;
177802 Fts3Table *pTab = (Fts3Table *)pCsr->base.pVtab;
180628 static int jsonEachDisconnect(sqlite3_vtab *pVtab){
180629 sqlite3_free(pVtab);
180943 sqlite3_free(cur->pVtab->zErrMsg);
180944 cur->pVtab->zErrMsg = sqlite3_mprintf("malformed JSON");
180945 if( cur->pVtab->zErrMsg ) rc = SQLITE_ERROR;
180968 sqlite3_free(cur->pVtab->zErrMsg);
180969 cur->pVtab->zErrMsg = jsonPathSyntaxError(zErr);
180971 return cur->pVtab->zErrMsg ? SQLITE_ERROR : SQLITE_NOMEM;
181424 #define RTREE_OF_CURSOR(X) ((Rtree*)((X)->base.pVtab))
182151 static int rtreeDisconnect(sqlite3_vtab *pVtab){
182152 rtreeRelease((Rtree *)pVtab);
182159 static int rtreeDestroy(sqlite3_vtab *pVtab){
182160 Rtree *pRtree = (Rtree *)pVtab;
182195 pCsr->base.pVtab = pVTab;
182227 Rtree *pRtree = (Rtree *)(cur->pVtab);
182803 Rtree *pRtree = (Rtree *)cur->pVtab;
182917 Rtree *pRtree = (Rtree *)pVtabCursor->pVtab;
182932 pCsr->base.pVtab = (sqlite3_vtab*)pRtree;
184270 sqlite3_vtab *pVtab,
184275 Rtree *pRtree = (Rtree *)pVtab;
184417 static int rtreeBeginTransaction(sqlite3_vtab *pVtab){
184418 Rtree *pRtree = (Rtree *)pVtab;
184428 static int rtreeEndTransaction(sqlite3_vtab *pVtab){
184429 Rtree *pRtree = (Rtree *)pVtab;
184438 static int rtreeRename(sqlite3_vtab *pVtab, const char *zNewName){
184439 Rtree *pRtree = (Rtree *)pVtab;
184471 static int rtreeSavepoint(sqlite3_vtab *pVtab, int iSavepoint){
184472 Rtree *pRtree = (Rtree *)pVtab;
186785 Rtree *pRtree = (Rtree *)pVtabCursor->pVtab;
186799 pCsr->base.pVtab = (sqlite3_vtab*)pRtree;
186969 Rtree *pRtree = (Rtree *)cur->pVtab;
187024 sqlite3_vtab *pVtab,
187029 Rtree *pRtree = (Rtree *)pVtab;
187061 pVtab->zErrMsg =
187160 sqlite3_vtab *pVtab,
194063 static int statDisconnect(sqlite3_vtab *pVtab){
194064 sqlite3_free(pVtab);
194128 pCsr->base.pVtab = pVTab;
194315 StatTable *pTab = (StatTable *)((sqlite3_vtab_cursor *)pCsr)->pVtab;
194344 StatTable *pTab = (StatTable *)pCursor->pVtab;
194487 StatTable *pTab = (StatTable*)(pCursor->pVtab);
194495 sqlite3_free(pCursor->pVtab->zErrMsg);
194496 pCursor->pVtab->zErrMsg = sqlite3_mprintf("no such schema: %s", zDbase);
194497 return pCursor->pVtab->zErrMsg ? SQLITE_ERROR : SQLITE_NOMEM_BKPT;
194710 static int dbpageDisconnect(sqlite3_vtab *pVtab){
194711 sqlite3_free(pVtab);
194786 pCsr->base.pVtab = pVTab;
194835 DbpageTable *pTab = (DbpageTable *)pCursor->pVtab;
194913 sqlite3_vtab *pVtab,
194918 DbpageTable *pTab = (DbpageTable *)pVtab;
194974 sqlite3_free(pVtab->zErrMsg);
194975 pVtab->zErrMsg = sqlite3_mprintf("%s", zErr);
194983 static int dbpageBegin(sqlite3_vtab *pVtab){
194984 DbpageTable *pTab = (DbpageTable *)pVtab;
215778 static int fts5DisconnectMethod(sqlite3_vtab *pVtab){
215779 fts5FreeVtab((Fts5FullTable*)pVtab);
215786 static int fts5DestroyMethod(sqlite3_vtab *pVtab){
215787 Fts5Table *pTab = (Fts5Table*)pVtab;
215790 fts5FreeVtab((Fts5FullTable*)pVtab);
216070 if( pCsr->base.pVtab==(sqlite3_vtab*)pTab ) return SQLITE_OK;
216126 Fts5FullTable *pTab = (Fts5FullTable*)(pCsr->base.pVtab);
216170 Fts5FullTable *pTab = (Fts5FullTable*)(pCursor->pVtab);
216231 && pCsr->base.pVtab==(sqlite3_vtab*)pTab
216254 Fts5FullTable *pTab = (Fts5FullTable*)(pCsr->base.pVtab);
216472 Fts5FullTable *pTab = (Fts5FullTable*)(pCsr->base.pVtab);
216543 pCsr->base.pVtab->zErrMsg = sqlite3_mprintf(
216587 Fts5FullTable *pTab = (Fts5FullTable*)(pCursor->pVtab);
216790 Fts5FullTable *pTab = (Fts5FullTable*)(pCsr->base.pVtab);
216939 sqlite3_vtab *pVtab, /* Virtual table handle */
216944 Fts5FullTable *pTab = (Fts5FullTable*)pVtab;
216952 assert( pVtab->zErrMsg==0 );
217064 static int fts5SyncMethod(sqlite3_vtab *pVtab){
217066 Fts5FullTable *pTab = (Fts5FullTable*)pVtab;
217078 static int fts5BeginMethod(sqlite3_vtab *pVtab){
217079 fts5CheckTransactionState((Fts5FullTable*)pVtab, FTS5_BEGIN, 0);
217080 fts5NewTransaction((Fts5FullTable*)pVtab);
217089 static int fts5CommitMethod(sqlite3_vtab *pVtab){
217090 UNUSED_PARAM(pVtab); /* Call below is a no-op for NDEBUG builds */
217091 fts5CheckTransactionState((Fts5FullTable*)pVtab, FTS5_COMMIT, 0);
217099 static int fts5RollbackMethod(sqlite3_vtab *pVtab){
217101 Fts5FullTable *pTab = (Fts5FullTable*)pVtab;
217116 return ((Fts5Table*)(pCsr->base.pVtab))->pConfig->nCol;
217125 Fts5FullTable *pTab = (Fts5FullTable*)(pCsr->base.pVtab);
217131 Fts5FullTable *pTab = (Fts5FullTable*)(pCsr->base.pVtab);
217142 Fts5Table *pTab = (Fts5Table*)(pCsr->base.pVtab);
217166 if( fts5IsContentless((Fts5FullTable*)(pCsr->base.pVtab))
217187 Fts5Config *pConfig = ((Fts5Table*)(pCsr->base.pVtab))->pConfig;
217237 int nCol = ((Fts5Table*)pCsr->base.pVtab)->pConfig->nCol;
217330 }else if( fts5IsOffsetless((Fts5Table*)pCsr->base.pVtab) ){
217367 Fts5FullTable *pTab = (Fts5FullTable*)(pCsr->base.pVtab);
217519 Fts5Config *pConfig = ((Fts5Table*)(pCsr->base.pVtab))->pConfig;
217551 Fts5Config *pConfig = ((Fts5Table*)(pCsr->base.pVtab))->pConfig;
217624 Fts5FullTable *pTab = (Fts5FullTable*)(pCsr->base.pVtab);
217628 rc = fts5OpenMethod(pCsr->base.pVtab, (sqlite3_vtab_cursor**)&pNew);
217633 pNew->base.pVtab = (sqlite3_vtab*)pTab;
217711 return (Fts5Table*)pCsr->base.pVtab;
217738 switch( ((Fts5Table*)(pCsr->base.pVtab))->pConfig->eDetail ){
217793 Fts5FullTable *pTab = (Fts5FullTable*)(pCursor->pVtab);
217840 sqlite3_vtab *pVtab, /* Virtual table handle */
217846 Fts5FullTable *pTab = (Fts5FullTable*)pVtab;
217865 sqlite3_vtab *pVtab, /* Virtual table handle */
217868 Fts5FullTable *pTab = (Fts5FullTable*)pVtab;
217882 static int fts5SavepointMethod(sqlite3_vtab *pVtab, int iSavepoint){
217884 fts5CheckTransactionState((Fts5FullTable*)pVtab, FTS5_SAVEPOINT, iSavepoint);
217885 return sqlite3Fts5FlushToDisk((Fts5Table*)pVtab);
217893 static int fts5ReleaseMethod(sqlite3_vtab *pVtab, int iSavepoint){
217895 fts5CheckTransactionState((Fts5FullTable*)pVtab, FTS5_RELEASE, iSavepoint);
217896 return sqlite3Fts5FlushToDisk((Fts5Table*)pVtab);
217904 static int fts5RollbackToMethod(sqlite3_vtab *pVtab, int iSavepoint){
217905 Fts5FullTable *pTab = (Fts5FullTable*)pVtab;
221920 static int fts5VocabDisconnectMethod(sqlite3_vtab *pVtab){
221921 Fts5VocabTable *pTab = (Fts5VocabTable*)pVtab;
221929 static int fts5VocabDestroyMethod(sqlite3_vtab *pVtab){
221930 Fts5VocabTable *pTab = (Fts5VocabTable*)pVtab;
222252 Fts5VocabTable *pTab = (Fts5VocabTable*)pCursor->pVtab;
222381 Fts5VocabTable *pTab = (Fts5VocabTable*)pCursor->pVtab;
222457 int eType = ((Fts5VocabTable*)(pCursor->pVtab))->eType;
222675 static int stmtDisconnect(sqlite3_vtab *pVtab){
222676 sqlite3_free(pVtab);