Home | History | Annotate | Download | only in orig

Lines Matching defs:pVTab

5506   int (*xBestIndex)(sqlite3_vtab *pVTab, sqlite3_index_info*);
5507 int (*xDisconnect)(sqlite3_vtab *pVTab);
5508 int (*xDestroy)(sqlite3_vtab *pVTab);
5509 int (*xOpen)(sqlite3_vtab *pVTab, sqlite3_vtab_cursor **ppCursor);
5518 int (*xBegin)(sqlite3_vtab *pVTab);
5519 int (*xSync)(sqlite3_vtab *pVTab);
5520 int (*xCommit)(sqlite3_vtab *pVTab);
5521 int (*xRollback)(sqlite3_vtab *pVTab);
5522 int (*xFindFunction)(sqlite3_vtab *pVtab, int nArg, const char *zName,
5525 int (*xRename)(sqlite3_vtab *pVtab, const char *zNew);
5528 int (*xSavepoint)(sqlite3_vtab *pVTab, int);
5529 int (*xRelease)(sqlite3_vtab *pVTab, int);
5530 int (*xRollbackTo)(sqlite3_vtab *pVTab, int);
5709 sqlite3_vtab *pVtab; /* Virtual table of this cursor */
8479 VTable *pVtab; /* Used when p4type is P4_VTAB */
10137 sqlite3_vtab *pVtab; /* Pointer to vtab instance */
60440 sqlite3_vtab *pVtab = pOp->p4.pVtab->pVtab;
60441 sqlite3_snprintf(nTemp, zTemp, "vtab:%p:%p", pVtab, pVtab->pModule);
64930 static void importVtabErrMsg(Vdbe *p, sqlite3_vtab *pVtab){
64933 p->zErrMsg = sqlite3DbStrDup(db, pVtab->zErrMsg);
64934 sqlite3_free(pVtab->zErrMsg);
64935 pVtab->zErrMsg = 0;
65244 sqlite3_vtab *pVtab;
65366 VTable *pVTab;
65371 sqlite3_vtab *pVtab;
65381 sqlite3_vtab *pVtab;
65388 sqlite3_vtab *pVtab;
65394 sqlite3_vtab *pVtab;
65400 sqlite3_vtab *pVtab;
65404 sqlite3_vtab *pVtab;
69173 sqlite3_vtab *pVtab;
69188 u.bm.pVtab = u.bm.pC->pVtabCursor->pVtab;
69189 u.bm.pModule = u.bm.pVtab->pModule;
69192 importVtabErrMsg(p, u.bm.pVtab);
70624 VTable *pVTab;
70626 u.ck.pVTab = pOp->p4.pVtab;
70627 rc = sqlite3VtabBegin(db, u.ck.pVTab);
70628 if( u.ck.pVTab ) importVtabErrMsg(p, u.ck.pVTab->pVtab);
70670 sqlite3_vtab *pVtab;
70676 u.cl.pVtab = pOp->p4.pVtab->pVtab;
70677 u.cl.pModule = (sqlite3_module *)u.cl.pVtab->pModule;
70678 assert(u.cl.pVtab && u.cl.pModule);
70679 rc = u.cl.pModule->xOpen(u.cl.pVtab, &u.cl.pVtabCursor);
70680 importVtabErrMsg(p, u.cl.pVtab);
70683 u.cl.pVtabCursor->pVtab = u.cl.pVtab;
70689 u.cl.pCur->pModule = u.cl.pVtabCursor->pVtab->pModule;
70726 sqlite3_vtab *pVtab;
70740 u.cm.pVtab = u.cm.pVtabCursor->pVtab;
70741 u.cm.pModule = u.cm.pVtab->pModule;
70760 importVtabErrMsg(p, u.cm.pVtab);
70784 sqlite3_vtab *pVtab;
70799 u.cn.pVtab = pCur->pVtabCursor->pVtab;
70800 u.cn.pModule = u.cn.pVtab->pModule;
70813 importVtabErrMsg(p, u.cn.pVtab);
70843 sqlite3_vtab *pVtab;
70855 u.co.pVtab = u.co.pCur->pVtabCursor->pVtab;
70856 u.co.pModule = u.co.pVtab->pModule;
70868 importVtabErrMsg(p, u.co.pVtab);
70890 sqlite3_vtab *pVtab;
70894 u.cp.pVtab = pOp->p4.pVtab->pVtab;
70896 assert( u.cp.pVtab->pModule->xRename );
70905 rc = u.cp.pVtab->pModule->xRename(u.cp.pVtab, u.cp.pName->z);
70906 importVtabErrMsg(p, u.cp.pVtab);
70939 sqlite3_vtab *pVtab;
70951 u.cq.pVtab = pOp->p4.pVtab->pVtab;
70952 u.cq.pModule = (sqlite3_module *)u.cq.pVtab->pModule;
70967 rc = u.cq.pModule->xUpdate(u.cq.pVtab, u.cq.nArg, u.cq.apArg, &u.cq.rowid);
70969 importVtabErrMsg(p, u.cq.pVtab);
70974 if( rc==SQLITE_CONSTRAINT && pOp->p4.pVtab->bConstraint ){
78840 VTable *pVTab = 0; /* Non-zero if this is a v-tab with an xRename() */
78896 pVTab = sqlite3GetVTable(db, pTab);
78897 if( pVTab->pVtab->pModule->xRename==0 ){
78898 pVTab = 0;
78912 sqlite3BeginWriteOperation(pParse, pVTab!=0, iDb);
78921 if( pVTab ){
78924 sqlite3VdbeAddOp4(v, OP_VRename, i, 0, 0,(const char*)pVTab, P4_VTAB);
85873 const char *pVTab = (const char *)sqlite3GetVTable(db, pTab);
85875 sqlite3VdbeAddOp4(v, OP_VUpdate, 0, 1, iRowid, pVTab, P4_VTAB);
89103 VTable *pVTab = IsVirtual(pTab) ? sqlite3GetVTable(p->db, pTab) : 0;
89122 if( pOp->opcode==OP_VOpen && pOp->p4.pVtab==pVTab ){
89123 assert( pOp->p4.pVtab!=0 );
89932 const char *pVTab = (const char *)sqlite3GetVTable(db, pTab);
89934 sqlite3VdbeAddOp4(v, OP_VUpdate, 1, pTab->nCol+2, regIns, pVTab, P4_VTAB);
101058 const char *pVTab = (const char*)sqlite3GetVTable(db, pTab);
101103 sqlite3VdbeAddOp4(v, OP_VUpdate, 0, pTab->nCol+2, iReg, pVTab, P4_VTAB);
101569 SQLITE_PRIVATE void sqlite3VtabLock(VTable *pVTab){
101570 pVTab->nRef++;
101580 VTable *pVtab;
101582 for(pVtab=pTab->pVTable; pVtab && pVtab->db!=db; pVtab=pVtab->pNext);
101583 return pVtab;
101590 SQLITE_PRIVATE void sqlite3VtabUnlock(VTable *pVTab){
101591 sqlite3 *db = pVTab->db;
101594 assert( pVTab->nRef>0 );
101597 pVTab->nRef--;
101598 if( pVTab->nRef==0 ){
101599 sqlite3_vtab *p = pVTab->pVtab;
101603 sqlite3DbFree(db, pVTab);
101939 rc = xConstruct(db, pMod->pAux, nArg, azArg, &pVTable->pVtab, &zErr);
101951 }else if( ALWAYS(pVTable->pVtab) ){
101954 pVTable->pVtab->pModule = pMod->pModule;
102067 ** Add the virtual table pVTab to the array sqlite3.aVTrans[]. Space should
102070 static void addToVTrans(sqlite3 *db, VTable *pVTab){
102071 /* Add pVtab to the end of sqlite3.aVTrans */
102072 db->aVTrans[db->nVTrans++] = pVTab;
102073 sqlite3VtabLock(pVTab);
102197 rc = p->pMod->pModule->xDestroy(p->pVtab);
102202 p->pVtab = 0;
102223 VTable *pVTab = db->aVTrans[i];
102224 sqlite3_vtab *p = pVTab->pVtab;
102230 pVTab->iSavepoint = 0;
102231 sqlite3VtabUnlock(pVTab);
102255 sqlite3_vtab *pVtab = aVTrans[i]->pVtab;
102256 if( pVtab && (x = pVtab->pModule->xSync)!=0 ){
102257 rc = x(pVtab);
102259 *pzErrmsg = sqlite3DbStrDup(db, pVtab->zErrMsg);
102260 sqlite3_free(pVtab->zErrMsg);
102286 ** If the virtual table pVtab supports the transaction interface
102293 SQLITE_PRIVATE int sqlite3VtabBegin(sqlite3 *db, VTable *pVTab){
102305 if( !pVTab ){
102308 pModule = pVTab->pVtab->pModule;
102313 /* If pVtab is already in the aVTrans array, return early */
102315 if( db->aVTrans[i]==pVTab ){
102324 rc = pModule->xBegin(pVTab->pVtab);
102326 addToVTrans(db, pVTab);
102356 VTable *pVTab = db->aVTrans[i];
102357 const sqlite3_module *pMod = pVTab->pMod->pModule;
102358 if( pVTab->pVtab && pMod->iVersion>=2 ){
102363 pVTab->iSavepoint = iSavepoint+1;
102372 if( xMethod && pVTab->iSavepoint>iSavepoint ){
102373 rc = xMethod(pVTab->pVtab, iSavepoint);
102401 sqlite3_vtab *pVtab;
102417 pVtab = sqlite3GetVTable(db, pTab)->pVtab;
102418 assert( pVtab!=0 );
102419 assert( pVtab->pModule!=0 );
102420 pMod = (sqlite3_module *)pVtab->pModule;
102431 rc = pMod->xFindFunction(pVtab, nArg, zLowerName, &xFunc, &pArg);
104794 sqlite3_vtab *pVtab = sqlite3GetVTable(pParse->db, pTab)->pVtab;
104800 rc = pVtab->pModule->xBestIndex(pVtab, p);
104806 }else if( !pVtab->zErrMsg ){
104809 sqlite3ErrorMsg(pParse, "%s", pVtab->zErrMsg);
104812 sqlite3_free(pVtab->zErrMsg);
104813 pVtab->zErrMsg = 0;
107544 const char *pVTab = (const char *)sqlite3GetVTable(db, pTab);
107546 sqlite3VdbeAddOp4(v, OP_VOpen, iCur, 0, 0, pVTab, P4_VTAB);
117088 static int fts3DisconnectMethod(sqlite3_vtab *pVtab){
117089 Fts3Table *p = (Fts3Table *)pVtab;
117142 static int fts3DestroyMethod(sqlite3_vtab *pVtab){
117143 Fts3Table *p = (Fts3Table *)pVtab;
117161 return (rc==SQLITE_OK ? fts3DisconnectMethod(pVtab) : rc);
118028 static int fts3BestIndexMethod(sqlite3_vtab *pVTab, sqlite3_index_info *pInfo){
118029 Fts3Table *p = (Fts3Table *)pVTab;
118109 static int fts3OpenMethod(sqlite3_vtab *pVTab, sqlite3_vtab_cursor **ppCsr){
118112 UNUSED_PARAMETER(pVTab);
118132 assert( ((Fts3Table *)pCsr->base.pVtab)->pSegments==0 );
118138 assert( ((Fts3Table *)pCsr->base.pVtab)->pSegments==0 );
118157 Fts3Table *p = (Fts3Table *)pCsr->base.pVtab;
118186 if( rc==SQLITE_OK && ((Fts3Table *)pCsr->base.pVtab)->zContentTbl==0 ){
119383 Fts3Table *p = (Fts3Table *)pCsr->base.pVtab;
119532 assert( ((Fts3Table *)pCsr->base.pVtab)->pSegments==0 );
119561 Fts3Table *p = (Fts3Table *)pCursor->pVtab;
119683 Fts3Table *p = (Fts3Table *)pCursor->pVtab;
119717 assert( ((Fts3Table *)pCsr->base.pVtab)->pSegments==0 );
119727 sqlite3_vtab *pVtab, /* Virtual table handle */
119732 return sqlite3Fts3UpdateMethod(pVtab, nArg, apVal, pRowid);
119739 static int fts3SyncMethod(sqlite3_vtab *pVtab){
119740 int rc = sqlite3Fts3PendingTermsFlush((Fts3Table *)pVtab);
119741 sqlite3Fts3SegmentsClose((Fts3Table *)pVtab);
119748 static int fts3BeginMethod(sqlite3_vtab *pVtab){
119749 TESTONLY( Fts3Table *p = (Fts3Table*)pVtab );
119750 UNUSED_PARAMETER(pVtab);
119764 static int fts3CommitMethod(sqlite3_vtab *pVtab){
119765 TESTONLY( Fts3Table *p = (Fts3Table*)pVtab );
119766 UNUSED_PARAMETER(pVtab);
119779 static int fts3RollbackMethod(sqlite3_vtab *pVtab){
119780 Fts3Table *p = (Fts3Table*)pVtab;
119920 p = (Fts3Table *)pCursor->base.pVtab;
119962 sqlite3_vtab *pVtab, /* Virtual table handle */
119979 UNUSED_PARAMETER(pVtab);
119998 sqlite3_vtab *pVtab, /* Virtual table handle */
120001 Fts3Table *p = (Fts3Table *)pVtab;
120049 static int fts3SavepointMethod(sqlite3_vtab *pVtab, int iSavepoint){
120051 assert( ((Fts3Table *)pVtab)->inTransaction );
120052 assert( ((Fts3Table *)pVtab)->mxSavepoint < iSavepoint );
120053 TESTONLY( ((Fts3Table *)pVtab)->mxSavepoint = iSavepoint );
120054 return fts3SyncMethod(pVtab);
120062 static int fts3ReleaseMethod(sqlite3_vtab *pVtab, int iSavepoint){
120063 TESTONLY( Fts3Table *p = (Fts3Table*)pVtab );
120065 UNUSED_PARAMETER(pVtab);
120077 static int fts3RollbackToMethod(sqlite3_vtab *pVtab, int iSavepoint){
120078 Fts3Table *p = (Fts3Table*)pVtab;
120345 Fts3Table *pTab = (Fts3Table *)pCsr->base.pVtab;
120486 Fts3Table *pTab = (Fts3Table *)pCsr->base.pVtab;
120590 Fts3Table *pTab = (Fts3Table *)pCsr->base.pVtab;
120783 Fts3Table *p = (Fts3Table*)pCsr->base.pVtab;
120836 Fts3Table *pTab = (Fts3Table *)pCsr->base.pVtab;
120960 Fts3Table *pTab = (Fts3Table *)pCsr->base.pVtab;
121577 Fts3Table *pTab = (Fts3Table *)pCsr->base.pVtab;
121686 Fts3Table *pTab = (Fts3Table *)pCsr->base.pVtab;
121735 Fts3Table *pTab = (Fts3Table *)pCsr->base.pVtab;
121923 static int fts3auxDisconnectMethod(sqlite3_vtab *pVtab){
121924 Fts3auxTable *p = (Fts3auxTable *)pVtab;
121945 sqlite3_vtab *pVTab,
121953 UNUSED_PARAMETER(pVTab);
122000 static int fts3auxOpenMethod(sqlite3_vtab *pVTab, sqlite3_vtab_cursor **ppCsr){
122003 UNUSED_PARAMETER(pVTab);
122017 Fts3Table *pFts3 = ((Fts3auxTable *)pCursor->pVtab)->pFts3Tab;
122050 Fts3Table *pFts3 = ((Fts3auxTable *)pCursor->pVtab)->pFts3Tab;
122150 Fts3Table *pFts3 = ((Fts3auxTable *)pCursor->pVtab)->pFts3Tab;
126480 Fts3Table *p = (Fts3Table*)pCsr->base.pVtab;
128306 Fts3Table *p = (Fts3Table *)pCsr->base.pVtab;
128453 sqlite3_vtab *pVtab, /* FTS3 vtab object */
128458 Fts3Table *p = (Fts3Table *)pVtab;
129218 Fts3Table *pTab = (Fts3Table *)pCsr->base.pVtab;
129623 Fts3Table *pTab = (Fts3Table *)pCsr->base.pVtab;
129723 Fts3Table *pTab = (Fts3Table *)pCsr->base.pVtab;
129795 Fts3Table *pTab = (Fts3Table *)pCsr->base.pVtab;
129937 Fts3Table *pTab = (Fts3Table *)pCsr->base.pVtab;
130076 Fts3Table *pTab = (Fts3Table *)pCsr->base.pVtab;
130880 static int rtreeDisconnect(sqlite3_vtab *pVtab){
130881 rtreeRelease((Rtree *)pVtab);
130888 static int rtreeDestroy(sqlite3_vtab *pVtab){
130889 Rtree *pRtree = (Rtree *)pVtab;
130915 static int rtreeOpen(sqlite3_vtab *pVTab, sqlite3_vtab_cursor **ppCursor){
130922 pCsr->base.pVtab = pVTab;
130953 Rtree *pRtree = (Rtree *)(cur->pVtab);
131198 Rtree *pRtree = (Rtree *)(pVtabCursor->pVtab);
131243 Rtree *pRtree = (Rtree *)pVtabCursor->pVtab;
131256 Rtree *pRtree = (Rtree *)cur->pVtab;
131351 Rtree *pRtree = (Rtree *)pVtabCursor->pVtab;
132834 sqlite3_vtab *pVtab,
132839 Rtree *pRtree = (Rtree *)pVtab;
132951 static int rtreeRename(sqlite3_vtab *pVtab, const char *zNewName){
132952 Rtree *pRtree = (Rtree *)pVtab;