Lines Matching refs:pStmt
94 sqlite3_stmt *pStmt; member
167 sqlite3_stmt *pStmt = 0; in getColumnNames() local
180 rc = sqlite3_prepare(db, zSql, -1, &pStmt, 0); in getColumnNames()
187 nCol = sqlite3_column_count(pStmt); in getColumnNames()
194 const char *zName = sqlite3_column_name(pStmt, ii); in getColumnNames()
213 sqlite3_snprintf(nBytes, zSpace, "%s", sqlite3_column_name(pStmt,ii)); in getColumnNames()
223 sqlite3_finalize(pStmt); in getColumnNames()
245 sqlite3_stmt *pStmt = 0; in getIndexArray() local
263 rc = sqlite3_prepare(db, zSql, -1, &pStmt, 0); in getIndexArray()
269 while( pStmt && sqlite3_step(pStmt)==SQLITE_ROW ){ in getIndexArray()
270 const char *zIdx = (const char *)sqlite3_column_text(pStmt, 1); in getIndexArray()
295 if( pStmt ){ in getIndexArray()
296 int rc2 = sqlite3_finalize(pStmt); in getIndexArray()
342 sqlite3_stmt *pStmt = 0; in echoDeclareVtab() local
345 -1, &pStmt, 0); in echoDeclareVtab()
347 sqlite3_bind_text(pStmt, 1, pVtab->zTableName, -1, 0); in echoDeclareVtab()
348 if( sqlite3_step(pStmt)==SQLITE_ROW ){ in echoDeclareVtab()
350 const char *zCreateTable = (const char *)sqlite3_column_text(pStmt, 0); in echoDeclareVtab()
352 rc2 = sqlite3_finalize(pStmt); in echoDeclareVtab()
357 rc = sqlite3_finalize(pStmt); in echoDeclareVtab()
573 sqlite3_stmt *pStmt = pCur->pStmt; in echoClose() local
574 pCur->pStmt = 0; in echoClose()
576 rc = sqlite3_finalize(pStmt); in echoClose()
585 return (((echo_cursor *)cur)->pStmt ? 0 : 1); in echoEof()
599 if( pCur->pStmt ){ in echoNext()
600 rc = sqlite3_step(pCur->pStmt); in echoNext()
604 rc = sqlite3_finalize(pCur->pStmt); in echoNext()
605 pCur->pStmt = 0; in echoNext()
617 sqlite3_stmt *pStmt = ((echo_cursor *)cur)->pStmt; in echoColumn() local
623 if( !pStmt ){ in echoColumn()
626 assert( sqlite3_data_count(pStmt)>iCol ); in echoColumn()
627 sqlite3_result_value(ctx, sqlite3_column_value(pStmt, iCol)); in echoColumn()
636 sqlite3_stmt *pStmt = ((echo_cursor *)cur)->pStmt; in echoRowid() local
642 *pRowid = sqlite3_column_int64(pStmt, 0); in echoRowid()
693 sqlite3_finalize(pCur->pStmt); in echoFilter()
694 pCur->pStmt = 0; in echoFilter()
699 rc = sqlite3_prepare(db, idxStr, -1, &pCur->pStmt, 0); in echoFilter()
700 assert( pCur->pStmt || rc!=SQLITE_OK ); in echoFilter()
702 rc = sqlite3_bind_value(pCur->pStmt, i+1, argv[i]); in echoFilter()
811 sqlite3_stmt *pStmt = 0; in echoBestIndex() local
841 rc = sqlite3_prepare(pVtab->db, zQuery, -1, &pStmt, 0); in echoBestIndex()
846 sqlite3_step(pStmt); in echoBestIndex()
847 nRow = sqlite3_column_int(pStmt, 0); in echoBestIndex()
848 rc = sqlite3_finalize(pStmt); in echoBestIndex()
979 sqlite3_stmt *pStmt = 0; in echoUpdate() local
1065 rc = sqlite3_prepare(db, z, -1, &pStmt, 0); in echoUpdate()
1067 assert( rc!=SQLITE_OK || pStmt ); in echoUpdate()
1071 sqlite3_bind_value(pStmt, nData, apData[0]); in echoUpdate()
1074 sqlite3_bind_value(pStmt, 1, apData[1]); in echoUpdate()
1077 if( apData[i] ) rc = sqlite3_bind_value(pStmt, i, apData[i]); in echoUpdate()
1080 sqlite3_step(pStmt); in echoUpdate()
1081 rc = sqlite3_finalize(pStmt); in echoUpdate()
1083 sqlite3_finalize(pStmt); in echoUpdate()