Lines Matching refs:pCur

112   bytecodevtab_cursor *pCur;  in bytecodevtabOpen()  local
113 pCur = sqlite3_malloc( sizeof(*pCur) ); in bytecodevtabOpen()
114 if( pCur==0 ) return SQLITE_NOMEM; in bytecodevtabOpen()
115 memset(pCur, 0, sizeof(*pCur)); in bytecodevtabOpen()
116 sqlite3VdbeMemInit(&pCur->sub, pVTab->db, 1); in bytecodevtabOpen()
117 *ppCursor = &pCur->base; in bytecodevtabOpen()
124 static void bytecodevtabCursorClear(bytecodevtab_cursor *pCur){ in bytecodevtabCursorClear() argument
125 sqlite3_free(pCur->zP4); in bytecodevtabCursorClear()
126 pCur->zP4 = 0; in bytecodevtabCursorClear()
127 sqlite3VdbeMemRelease(&pCur->sub); in bytecodevtabCursorClear()
128 sqlite3VdbeMemSetNull(&pCur->sub); in bytecodevtabCursorClear()
129 if( pCur->needFinalize ){ in bytecodevtabCursorClear()
130 sqlite3_finalize(pCur->pStmt); in bytecodevtabCursorClear()
132 pCur->pStmt = 0; in bytecodevtabCursorClear()
133 pCur->needFinalize = 0; in bytecodevtabCursorClear()
134 pCur->zType = 0; in bytecodevtabCursorClear()
135 pCur->zSchema = 0; in bytecodevtabCursorClear()
136 pCur->zName = 0; in bytecodevtabCursorClear()
143 bytecodevtab_cursor *pCur = (bytecodevtab_cursor*)cur; in bytecodevtabClose() local
144 bytecodevtabCursorClear(pCur); in bytecodevtabClose()
145 sqlite3_free(pCur); in bytecodevtabClose()
154 bytecodevtab_cursor *pCur = (bytecodevtab_cursor*)cur; in bytecodevtabNext() local
157 if( pCur->zP4 ){ in bytecodevtabNext()
158 sqlite3_free(pCur->zP4); in bytecodevtabNext()
159 pCur->zP4 = 0; in bytecodevtabNext()
161 if( pCur->zName ){ in bytecodevtabNext()
162 pCur->zName = 0; in bytecodevtabNext()
163 pCur->zType = 0; in bytecodevtabNext()
164 pCur->zSchema = 0; in bytecodevtabNext()
167 (Vdbe*)pCur->pStmt, in bytecodevtabNext()
168 pCur->showSubprograms ? &pCur->sub : 0, in bytecodevtabNext()
170 &pCur->iRowid, in bytecodevtabNext()
171 &pCur->iAddr, in bytecodevtabNext()
172 &pCur->aOp); in bytecodevtabNext()
174 sqlite3VdbeMemSetNull(&pCur->sub); in bytecodevtabNext()
175 pCur->aOp = 0; in bytecodevtabNext()
185 bytecodevtab_cursor *pCur = (bytecodevtab_cursor*)cur; in bytecodevtabEof() local
186 return pCur->aOp==0; in bytecodevtabEof()
198 bytecodevtab_cursor *pCur = (bytecodevtab_cursor*)cur; in bytecodevtabColumn() local
200 Op *pOp = pCur->aOp + pCur->iAddr; in bytecodevtabColumn()
205 if( i<=2 && pCur->zType==0 ){ in bytecodevtabColumn()
212 pCur->zSchema = db->aDb[iDb].zDbSName; in bytecodevtabColumn()
216 pCur->zName = pTab->zName; in bytecodevtabColumn()
217 pCur->zType = "table"; in bytecodevtabColumn()
221 if( pCur->zName==0 ){ in bytecodevtabColumn()
225 pCur->zName = pIdx->zName; in bytecodevtabColumn()
226 pCur->zType = "index"; in bytecodevtabColumn()
236 sqlite3_result_int(ctx, pCur->iAddr); in bytecodevtabColumn()
253 if( pCur->zP4==0 ){ in bytecodevtabColumn()
254 pCur->zP4 = sqlite3VdbeDisplayP4(pVTab->db, pOp); in bytecodevtabColumn()
257 sqlite3_result_text(ctx, pCur->zP4, -1, SQLITE_STATIC); in bytecodevtabColumn()
260 char *zCom = sqlite3VdbeDisplayComment(pVTab->db, pOp, pCur->zP4); in bytecodevtabColumn()
269 Op *aOp = pCur->aOp; in bytecodevtabColumn()
272 if( pCur->iRowid==pCur->iAddr+1 ){ in bytecodevtabColumn()
282 sqlite3_result_text(ctx, pCur->zType, -1, SQLITE_STATIC); in bytecodevtabColumn()
285 sqlite3_result_text(ctx, pCur->zSchema, -1, SQLITE_STATIC); in bytecodevtabColumn()
288 sqlite3_result_text(ctx, pCur->zName, -1, SQLITE_STATIC); in bytecodevtabColumn()
302 bytecodevtab_cursor *pCur = (bytecodevtab_cursor*)cur; in bytecodevtabRowid() local
303 *pRowid = pCur->iRowid; in bytecodevtabRowid()
318 bytecodevtab_cursor *pCur = (bytecodevtab_cursor *)pVtabCursor; in bytecodevtabFilter() local
322 bytecodevtabCursorClear(pCur); in bytecodevtabFilter()
323 pCur->iRowid = 0; in bytecodevtabFilter()
324 pCur->iAddr = 0; in bytecodevtabFilter()
325 pCur->showSubprograms = idxNum==0; in bytecodevtabFilter()
332 rc = sqlite3_prepare_v2(pVTab->db, zSql, -1, &pCur->pStmt, 0); in bytecodevtabFilter()
333 pCur->needFinalize = 1; in bytecodevtabFilter()
336 pCur->pStmt = (sqlite3_stmt*)sqlite3_value_pointer(argv[0],"stmt-pointer"); in bytecodevtabFilter()
338 if( pCur->pStmt==0 ){ in bytecodevtabFilter()