Lines Matching refs:pStmt
2119 sqlite3_stmt *pStmt; in test_finalize() local
2129 if( getStmtPointer(interp, Tcl_GetString(objv[1]), &pStmt) ) return TCL_ERROR; in test_finalize()
2131 if( pStmt ){ in test_finalize()
2132 db = StmtToDb(pStmt); in test_finalize()
2134 rc = sqlite3_finalize(pStmt); in test_finalize()
2154 sqlite3_stmt *pStmt; in test_stmt_status() local
2172 if( getStmtPointer(interp, Tcl_GetString(objv[1]), &pStmt) ) return TCL_ERROR; in test_stmt_status()
2184 iValue = sqlite3_stmt_status(pStmt, op, resetFlag); in test_stmt_status()
2199 sqlite3_stmt *pStmt; /* First argument */ in test_stmt_scanstatus() local
2213 if( getStmtPointer(interp, Tcl_GetString(objv[1]), &pStmt) ) return TCL_ERROR; in test_stmt_scanstatus()
2216 res = sqlite3_stmt_scanstatus(pStmt, idx, SQLITE_SCANSTAT_NLOOP, (void*)&nLoop); in test_stmt_scanstatus()
2221 sqlite3_stmt_scanstatus(pStmt, idx, SQLITE_SCANSTAT_NVISIT, (void*)&nVisit); in test_stmt_scanstatus()
2224 sqlite3_stmt_scanstatus(pStmt, idx, SQLITE_SCANSTAT_EST, (void*)&rEst); in test_stmt_scanstatus()
2227 sqlite3_stmt_scanstatus(pStmt, idx, SQLITE_SCANSTAT_NAME, (void*)&zName); in test_stmt_scanstatus()
2230 sqlite3_stmt_scanstatus(pStmt, idx, SQLITE_SCANSTAT_EXPLAIN, (void*)&zExplain); in test_stmt_scanstatus()
2249 sqlite3_stmt *pStmt; /* First argument */ in test_stmt_scanstatus_reset() local
2254 if( getStmtPointer(interp, Tcl_GetString(objv[1]), &pStmt) ) return TCL_ERROR; in test_stmt_scanstatus_reset()
2255 sqlite3_stmt_scanstatus_reset(pStmt); in test_stmt_scanstatus_reset()
2652 sqlite3_stmt *pStmt; in test_next_stmt() local
2663 if( getStmtPointer(interp, Tcl_GetString(objv[2]), &pStmt) ) return TCL_ERROR; in test_next_stmt()
2664 pStmt = sqlite3_next_stmt(db, pStmt); in test_next_stmt()
2665 if( pStmt ){ in test_next_stmt()
2666 if( sqlite3TestMakePointerStr(interp, zBuf, pStmt) ) return TCL_ERROR; in test_next_stmt()
2684 sqlite3_stmt *pStmt; in test_stmt_readonly() local
2693 if( getStmtPointer(interp, Tcl_GetString(objv[1]), &pStmt) ) return TCL_ERROR; in test_stmt_readonly()
2694 rc = sqlite3_stmt_readonly(pStmt); in test_stmt_readonly()
2711 sqlite3_stmt *pStmt; in test_stmt_isexplain() local
2720 if( getStmtPointer(interp, Tcl_GetString(objv[1]), &pStmt) ) return TCL_ERROR; in test_stmt_isexplain()
2721 rc = sqlite3_stmt_isexplain(pStmt); in test_stmt_isexplain()
2738 sqlite3_stmt *pStmt; in test_stmt_busy() local
2747 if( getStmtPointer(interp, Tcl_GetString(objv[1]), &pStmt) ) return TCL_ERROR; in test_stmt_busy()
2748 rc = sqlite3_stmt_busy(pStmt); in test_stmt_busy()
2764 sqlite3_stmt *pStmt; in uses_stmt_journal() local
2772 if( getStmtPointer(interp, Tcl_GetString(objv[1]), &pStmt) ) return TCL_ERROR; in uses_stmt_journal()
2773 sqlite3_stmt_readonly(pStmt); in uses_stmt_journal()
2774 Tcl_SetObjResult(interp, Tcl_NewBooleanObj(((Vdbe *)pStmt)->usesStmtJournal)); in uses_stmt_journal()
2790 sqlite3_stmt *pStmt; in test_reset() local
2799 if( getStmtPointer(interp, Tcl_GetString(objv[1]), &pStmt) ) return TCL_ERROR; in test_reset()
2801 rc = sqlite3_reset(pStmt); in test_reset()
2802 if( pStmt && sqlite3TestErrCode(interp, StmtToDb(pStmt), rc) ){ in test_reset()
2826 sqlite3_stmt *pStmt; in test_expired() local
2832 if( getStmtPointer(interp, Tcl_GetString(objv[1]), &pStmt) ) return TCL_ERROR; in test_expired()
2833 Tcl_SetObjResult(interp, Tcl_NewBooleanObj(sqlite3_expired(pStmt))); in test_expired()
2911 sqlite3_stmt *pStmt; in test_bind() local
2919 if( getStmtPointer(interp, argv[1], &pStmt) ) return TCL_ERROR; in test_bind()
2922 rc = sqlite3_bind_null(pStmt, idx); in test_bind()
2924 rc = sqlite3_bind_text(pStmt, idx, sqlite_static_bind_value, -1, 0); in test_bind()
2926 rc = sqlite3_bind_text(pStmt, idx, sqlite_static_bind_value, in test_bind()
2929 rc = sqlite3_bind_text(pStmt, idx, argv[3], -1, SQLITE_TRANSIENT); in test_bind()
2931 rc = sqlite3_bind_text(pStmt, idx, "abc\000xyz\000pq", 10, SQLITE_STATIC); in test_bind()
2937 if( sqlite3TestErrCode(interp, StmtToDb(pStmt), rc) ) return TCL_ERROR; in test_bind()
3427 sqlite3_stmt *pStmt; in test_bind_zeroblob() local
3437 if( getStmtPointer(interp, Tcl_GetString(objv[1]), &pStmt) ) return TCL_ERROR; in test_bind_zeroblob()
3441 rc = sqlite3_bind_zeroblob(pStmt, idx, n); in test_bind_zeroblob()
3442 if( sqlite3TestErrCode(interp, StmtToDb(pStmt), rc) ) return TCL_ERROR; in test_bind_zeroblob()
3463 sqlite3_stmt *pStmt; in test_bind_zeroblob64() local
3473 if( getStmtPointer(interp, Tcl_GetString(objv[1]), &pStmt) ) return TCL_ERROR; in test_bind_zeroblob64()
3477 rc = sqlite3_bind_zeroblob64(pStmt, idx, n); in test_bind_zeroblob64()
3478 if( sqlite3TestErrCode(interp, StmtToDb(pStmt), rc) ) return TCL_ERROR; in test_bind_zeroblob64()
3500 sqlite3_stmt *pStmt; in test_bind_int() local
3511 if( getStmtPointer(interp, Tcl_GetString(objv[1]), &pStmt) ) return TCL_ERROR; in test_bind_int()
3515 rc = sqlite3_bind_int(pStmt, idx, value); in test_bind_int()
3516 if( sqlite3TestErrCode(interp, StmtToDb(pStmt), rc) ) return TCL_ERROR; in test_bind_int()
3677 sqlite3_stmt *pStmt; in test_bind_int64() local
3688 if( getStmtPointer(interp, Tcl_GetString(objv[1]), &pStmt) ) return TCL_ERROR; in test_bind_int64()
3692 rc = sqlite3_bind_int64(pStmt, idx, value); in test_bind_int64()
3693 if( sqlite3TestErrCode(interp, StmtToDb(pStmt), rc) ) return TCL_ERROR; in test_bind_int64()
3715 sqlite3_stmt *pStmt; in test_bind_double() local
3744 if( getStmtPointer(interp, Tcl_GetString(objv[1]), &pStmt) ) return TCL_ERROR; in test_bind_double()
3769 rc = sqlite3_bind_double(pStmt, idx, value); in test_bind_double()
3770 if( sqlite3TestErrCode(interp, StmtToDb(pStmt), rc) ) return TCL_ERROR; in test_bind_double()
3791 sqlite3_stmt *pStmt; in test_bind_null() local
3801 if( getStmtPointer(interp, Tcl_GetString(objv[1]), &pStmt) ) return TCL_ERROR; in test_bind_null()
3804 rc = sqlite3_bind_null(pStmt, idx); in test_bind_null()
3805 if( sqlite3TestErrCode(interp, StmtToDb(pStmt), rc) ) return TCL_ERROR; in test_bind_null()
3827 sqlite3_stmt *pStmt; in test_bind_text() local
3841 if( getStmtPointer(interp, Tcl_GetString(objv[1]), &pStmt) ) return TCL_ERROR; in test_bind_text()
3855 rc = sqlite3_bind_text(pStmt, idx, value, bytes, SQLITE_TRANSIENT); in test_bind_text()
3857 if( sqlite3TestErrCode(interp, StmtToDb(pStmt), rc) ) return TCL_ERROR; in test_bind_text()
3881 sqlite3_stmt *pStmt; in test_bind_text16() local
3901 if( getStmtPointer(interp, Tcl_GetString(oStmt), &pStmt) ) return TCL_ERROR; in test_bind_text16()
3915 rc = sqlite3_bind_text16(pStmt, idx, (void *)value, bytes, xDel); in test_bind_text16()
3917 if( sqlite3TestErrCode(interp, StmtToDb(pStmt), rc) ) return TCL_ERROR; in test_bind_text16()
3940 sqlite3_stmt *pStmt; in test_bind_blob() local
3958 if( getStmtPointer(interp, Tcl_GetString(objv[1]), &pStmt) ) return TCL_ERROR; in test_bind_blob()
3972 rc = sqlite3_bind_blob(pStmt, idx, value, bytes, xDestructor); in test_bind_blob()
3973 if( sqlite3TestErrCode(interp, StmtToDb(pStmt), rc) ) return TCL_ERROR; in test_bind_blob()
3995 sqlite3_stmt *pStmt; in test_bind_value_from_preupdate() local
4007 if( getStmtPointer(interp, Tcl_GetString(objv[1]), &pStmt) ) return TCL_ERROR; in test_bind_value_from_preupdate()
4011 db = sqlite3_db_handle(pStmt); in test_bind_value_from_preupdate()
4022 sqlite3_bind_value(pStmt, idx, pVal); in test_bind_value_from_preupdate()
4040 sqlite3_stmt *pStmt; in test_bind_value_from_select() local
4052 if( getStmtPointer(interp, Tcl_GetString(objv[1]), &pStmt) ) return TCL_ERROR; in test_bind_value_from_select()
4055 db = sqlite3_db_handle(pStmt); in test_bind_value_from_select()
4064 sqlite3_bind_value(pStmt, idx, pVal); in test_bind_value_from_select()
4099 sqlite3_stmt *pStmt; in test_carray_bind() local
4113 sqlite3_stmt *pStmt, in test_carray_bind()
4179 if( getStmtPointer(interp, Tcl_GetString(objv[i]), &pStmt) ) return TCL_ERROR; in test_carray_bind()
4250 rc = sqlite3_carray_bind(pStmt, idx, aData, nData, eType, xDel); in test_carray_bind()
4277 sqlite3_stmt *pStmt; in test_bind_parameter_count() local
4283 if( getStmtPointer(interp, Tcl_GetString(objv[1]), &pStmt) ) return TCL_ERROR; in test_bind_parameter_count()
4284 Tcl_SetObjResult(interp, Tcl_NewIntObj(sqlite3_bind_parameter_count(pStmt))); in test_bind_parameter_count()
4301 sqlite3_stmt *pStmt; in test_bind_parameter_name() local
4308 if( getStmtPointer(interp, Tcl_GetString(objv[1]), &pStmt) ) return TCL_ERROR; in test_bind_parameter_name()
4311 Tcl_NewStringObj(sqlite3_bind_parameter_name(pStmt,i),-1) in test_bind_parameter_name()
4328 sqlite3_stmt *pStmt; in test_bind_parameter_index() local
4334 if( getStmtPointer(interp, Tcl_GetString(objv[1]), &pStmt) ) return TCL_ERROR; in test_bind_parameter_index()
4337 sqlite3_bind_parameter_index(pStmt,Tcl_GetString(objv[2])) in test_bind_parameter_index()
4353 sqlite3_stmt *pStmt; in test_clear_bindings() local
4359 if( getStmtPointer(interp, Tcl_GetString(objv[1]), &pStmt) ) return TCL_ERROR; in test_clear_bindings()
4360 Tcl_SetObjResult(interp, Tcl_NewIntObj(sqlite3_clear_bindings(pStmt))); in test_clear_bindings()
4549 sqlite3_stmt *pStmt = 0; in test_prepare() local
4562 rc = sqlite3_prepare(db, zSql, bytes, &pStmt, objc>=5 ? &zTail : 0); in test_prepare()
4575 assert( pStmt==0 ); in test_prepare()
4581 if( pStmt ){ in test_prepare()
4582 if( sqlite3TestMakePointerStr(interp, zBuf, pStmt) ) return TCL_ERROR; in test_prepare()
4608 sqlite3_stmt *pStmt = 0; in test_prepare_v2() local
4633 rc = sqlite3_prepare_v2(db, zCopy, bytes, &pStmt, pzTail); in test_prepare_v2()
4639 assert(rc==SQLITE_OK || pStmt==0); in test_prepare_v2()
4649 assert( pStmt==0 ); in test_prepare_v2()
4655 if( pStmt ){ in test_prepare_v2()
4656 if( sqlite3TestMakePointerStr(interp, zBuf, pStmt) ) return TCL_ERROR; in test_prepare_v2()
4682 sqlite3_stmt *pStmt = 0; in test_prepare_v3() local
4708 rc = sqlite3_prepare_v3(db, zCopy, bytes, (unsigned int)flags,&pStmt,pzTail); in test_prepare_v3()
4712 assert(rc==SQLITE_OK || pStmt==0); in test_prepare_v3()
4722 assert( pStmt==0 ); in test_prepare_v3()
4728 if( pStmt ){ in test_prepare_v3()
4729 if( sqlite3TestMakePointerStr(interp, zBuf, pStmt) ) return TCL_ERROR; in test_prepare_v3()
4749 sqlite3_stmt *pStmt = 0; in test_prepare_tkt3134() local
4759 rc = sqlite3_prepare_v2(db, &zSql[1], 0, &pStmt, 0); in test_prepare_tkt3134()
4760 assert(rc==SQLITE_OK || pStmt==0); in test_prepare_tkt3134()
4763 assert( pStmt==0 ); in test_prepare_tkt3134()
4769 if( pStmt ){ in test_prepare_tkt3134()
4770 if( sqlite3TestMakePointerStr(interp, zBuf, pStmt) ) return TCL_ERROR; in test_prepare_tkt3134()
4795 sqlite3_stmt *pStmt = 0; in test_prepare16() local
4810 rc = sqlite3_prepare16(db, zSql, bytes, &pStmt, objc>=5 ? &zTail : 0); in test_prepare16()
4828 if( pStmt ){ in test_prepare16()
4829 if( sqlite3TestMakePointerStr(interp, zBuf, pStmt) ) return TCL_ERROR; in test_prepare16()
4855 sqlite3_stmt *pStmt = 0; in test_prepare16_v2() local
4870 rc = sqlite3_prepare16_v2(db, zSql, bytes, &pStmt, objc>=5 ? &zTail : 0); in test_prepare16_v2()
4888 if( pStmt ){ in test_prepare16_v2()
4889 if( sqlite3TestMakePointerStr(interp, zBuf, pStmt) ) return TCL_ERROR; in test_prepare16_v2()
5089 sqlite3_stmt *pStmt; in test_step() local
5098 if( getStmtPointer(interp, Tcl_GetString(objv[1]), &pStmt) ) return TCL_ERROR; in test_step()
5099 rc = sqlite3_step(pStmt); in test_step()
5112 sqlite3_stmt *pStmt; in test_sql() local
5119 if( getStmtPointer(interp, Tcl_GetString(objv[1]), &pStmt) ) return TCL_ERROR; in test_sql()
5120 Tcl_SetResult(interp, (char *)sqlite3_sql(pStmt), TCL_VOLATILE); in test_sql()
5129 sqlite3_stmt *pStmt; in test_ex_sql() local
5137 if( getStmtPointer(interp, Tcl_GetString(objv[1]), &pStmt) ) return TCL_ERROR; in test_ex_sql()
5138 z = sqlite3_expanded_sql(pStmt); in test_ex_sql()
5150 sqlite3_stmt *pStmt; in test_norm_sql() local
5157 if( getStmtPointer(interp, Tcl_GetString(objv[1]), &pStmt) ) return TCL_ERROR; in test_norm_sql()
5158 Tcl_SetResult(interp, (char *)sqlite3_normalized_sql(pStmt), TCL_VOLATILE); in test_norm_sql()
5174 sqlite3_stmt *pStmt; in test_column_count() local
5182 if( getStmtPointer(interp, Tcl_GetString(objv[1]), &pStmt) ) return TCL_ERROR; in test_column_count()
5184 Tcl_SetObjResult(interp, Tcl_NewIntObj(sqlite3_column_count(pStmt))); in test_column_count()
5199 sqlite3_stmt *pStmt; in test_column_type() local
5209 if( getStmtPointer(interp, Tcl_GetString(objv[1]), &pStmt) ) return TCL_ERROR; in test_column_type()
5212 tp = sqlite3_column_type(pStmt, col); in test_column_type()
5248 sqlite3_stmt *pStmt; in test_column_int64() local
5258 if( getStmtPointer(interp, Tcl_GetString(objv[1]), &pStmt) ) return TCL_ERROR; in test_column_int64()
5261 iVal = sqlite3_column_int64(pStmt, col); in test_column_int64()
5275 sqlite3_stmt *pStmt; in test_column_blob() local
5287 if( getStmtPointer(interp, Tcl_GetString(objv[1]), &pStmt) ) return TCL_ERROR; in test_column_blob()
5290 len = sqlite3_column_bytes(pStmt, col); in test_column_blob()
5291 pBlob = sqlite3_column_blob(pStmt, col); in test_column_blob()
5307 sqlite3_stmt *pStmt; in test_column_double() local
5317 if( getStmtPointer(interp, Tcl_GetString(objv[1]), &pStmt) ) return TCL_ERROR; in test_column_double()
5320 rVal = sqlite3_column_double(pStmt, col); in test_column_double()
5336 sqlite3_stmt *pStmt; in test_data_count() local
5344 if( getStmtPointer(interp, Tcl_GetString(objv[1]), &pStmt) ) return TCL_ERROR; in test_data_count()
5346 Tcl_SetObjResult(interp, Tcl_NewIntObj(sqlite3_data_count(pStmt))); in test_data_count()
5363 sqlite3_stmt *pStmt; in test_stmt_utf8() local
5375 if( getStmtPointer(interp, Tcl_GetString(objv[1]), &pStmt) ) return TCL_ERROR; in test_stmt_utf8()
5377 zRet = xFunc(pStmt, col); in test_stmt_utf8()
5416 sqlite3_stmt *pStmt; in test_stmt_utf16() local
5429 if( getStmtPointer(interp, Tcl_GetString(objv[1]), &pStmt) ) return TCL_ERROR; in test_stmt_utf16()
5432 zName16 = xFunc(pStmt, col); in test_stmt_utf16()
5459 sqlite3_stmt *pStmt; in test_stmt_int() local
5470 if( getStmtPointer(interp, Tcl_GetString(objv[1]), &pStmt) ) return TCL_ERROR; in test_stmt_int()
5473 Tcl_SetObjResult(interp, Tcl_NewIntObj(xFunc(pStmt, col))); in test_stmt_int()
7158 int printExplainQueryPlan(sqlite3_stmt *pStmt){ in printExplainQueryPlan() argument
7164 zSql = sqlite3_sql(pStmt); in printExplainQueryPlan()
7170 rc = sqlite3_prepare_v2(sqlite3_db_handle(pStmt), zExplain, -1, &pExplain, 0); in printExplainQueryPlan()
7193 sqlite3_stmt *pStmt; in test_print_eqp() local
7199 if( getStmtPointer(interp, Tcl_GetString(objv[1]), &pStmt) ) return TCL_ERROR; in test_print_eqp()
7200 rc = printExplainQueryPlan(pStmt); in test_print_eqp()
7861 sqlite3_stmt *pStmt; in sorter_test_sort4_helper() local
7873 rc = sqlite3_prepare_v2(db, zSql1, -1, &pStmt, 0); in sorter_test_sort4_helper()
7876 iB = sqlite3_column_count(pStmt)-1; in sorter_test_sort4_helper()
7877 for(iStep=0; iStep<nStep && SQLITE_ROW==sqlite3_step(pStmt); iStep++){ in sorter_test_sort4_helper()
7878 int a = sqlite3_column_int(pStmt, 0); in sorter_test_sort4_helper()
7879 if( a!=sqlite3_column_int(pStmt, iB) ){ in sorter_test_sort4_helper()
7886 rc = sqlite3_finalize(pStmt); in sorter_test_sort4_helper()
7889 rc = sqlite3_prepare_v2(db, zSql2, -1, &pStmt, 0); in sorter_test_sort4_helper()
7891 for(iStep=0; SQLITE_ROW==sqlite3_step(pStmt); iStep++){ in sorter_test_sort4_helper()
7892 int a = sqlite3_column_int(pStmt, 0); in sorter_test_sort4_helper()
7895 rc = sqlite3_finalize(pStmt); in sorter_test_sort4_helper()