Lines Matching refs:pCur

112   schema_cursor *pCur;  in schemaOpen()  local
113 pCur = sqlite3_malloc(sizeof(schema_cursor)); in schemaOpen()
114 if( pCur ){ in schemaOpen()
115 memset(pCur, 0, sizeof(schema_cursor)); in schemaOpen()
116 *ppCursor = (sqlite3_vtab_cursor *)pCur; in schemaOpen()
126 schema_cursor *pCur = (schema_cursor *)cur; in schemaClose() local
127 sqlite3_finalize(pCur->pDbList); in schemaClose()
128 sqlite3_finalize(pCur->pTableList); in schemaClose()
129 sqlite3_finalize(pCur->pColumnList); in schemaClose()
130 sqlite3_free(pCur); in schemaClose()
138 schema_cursor *pCur = (schema_cursor *)cur; in schemaColumn() local
141 sqlite3_result_value(ctx, sqlite3_column_value(pCur->pDbList, 1)); in schemaColumn()
144 sqlite3_result_value(ctx, sqlite3_column_value(pCur->pTableList, 0)); in schemaColumn()
147 sqlite3_result_value(ctx, sqlite3_column_value(pCur->pColumnList, i-2)); in schemaColumn()
157 schema_cursor *pCur = (schema_cursor *)cur; in schemaRowid() local
158 *pRowid = pCur->rowid; in schemaRowid()
169 schema_cursor *pCur = (schema_cursor *)cur; in schemaEof() local
170 return (pCur->pDbList ? 0 : 1); in schemaEof()
178 schema_cursor *pCur = (schema_cursor *)cur; in schemaNext() local
182 while( !pCur->pColumnList || SQLITE_ROW!=sqlite3_step(pCur->pColumnList) ){ in schemaNext()
183 if( SQLITE_OK!=(rc = finalize(&pCur->pColumnList)) ) goto next_exit; in schemaNext()
185 while( !pCur->pTableList || SQLITE_ROW!=sqlite3_step(pCur->pTableList) ){ in schemaNext()
186 if( SQLITE_OK!=(rc = finalize(&pCur->pTableList)) ) goto next_exit; in schemaNext()
188 assert(pCur->pDbList); in schemaNext()
189 while( SQLITE_ROW!=sqlite3_step(pCur->pDbList) ){ in schemaNext()
190 rc = finalize(&pCur->pDbList); in schemaNext()
199 if( sqlite3_column_int(pCur->pDbList, 0)==1 ){ in schemaNext()
204 sqlite3_stmt *pDbList = pCur->pDbList; in schemaNext()
215 rc = sqlite3_prepare(pVtab->db, zSql, -1, &pCur->pTableList, 0); in schemaNext()
225 sqlite3_column_text(pCur->pDbList, 1), in schemaNext()
226 sqlite3_column_text(pCur->pTableList, 0) in schemaNext()
233 rc = sqlite3_prepare(pVtab->db, zSql, -1, &pCur->pColumnList, 0); in schemaNext()
237 pCur->rowid++; in schemaNext()
254 schema_cursor *pCur = (schema_cursor *)pVtabCursor; in schemaFilter() local
255 pCur->rowid = 0; in schemaFilter()
256 finalize(&pCur->pTableList); in schemaFilter()
257 finalize(&pCur->pColumnList); in schemaFilter()
258 finalize(&pCur->pDbList); in schemaFilter()
259 rc = sqlite3_prepare(pVtab->db,"PRAGMA database_list", -1, &pCur->pDbList, 0); in schemaFilter()