Lines Matching refs:zSql

141   int nSql;                /* chars in zSql[] */
142 const char *zSql; /* Text of the SQL statement */
502 Tcl_Free((char *)pStmt->zSql);
625 static void DbTraceHandler(void *cd, const char *zSql){
631 Tcl_DStringAppendElement(&str, zSql);
657 char *zSql = (char *)xd;
664 Tcl_NewStringObj(zSql, -1));
720 static void DbProfileHandler(void *cd, const char *zSql, sqlite_uint64 tm){
728 Tcl_DStringAppendElement(&str, zSql);
1266 const char *zSql, /* SQL to compile */
1273 return sqlite3_prepare(pDb->db, zSql, -1, ppStmt, pzOut);
1281 return sqlite3_prepare_v3(pDb->db, zSql, -1, prepFlags, ppStmt, pzOut);
1305 const char *zSql = zIn; /* Pointer to first SQL statement in zIn */
1308 int nSql; /* Length of zSql in bytes */
1319 /* Trim spaces from the start of zSql and calculate the remaining length. */
1320 while( (c = zSql[0])==' ' || c=='\t' || c=='\r' || c=='\n' ){ zSql++; }
1321 nSql = strlen30(zSql);
1326 && memcmp(pPreStmt->zSql, zSql, n)==0
1327 && (zSql[n]==0 || zSql[n-1]==';')
1330 *pzOut = &zSql[pPreStmt->nSql];
1357 if( SQLITE_OK!=dbPrepare(pDb, zSql, &pStmt, pzOut) ){
1381 pPreStmt->nSql = (int)(*pzOut - zSql);
1382 pPreStmt->zSql = sqlite3_sql(pStmt);
1385 if( pPreStmt->zSql==0 ){
1387 memcpy(zCopy, zSql, pPreStmt->nSql);
1389 pPreStmt->zSql = zCopy;
1394 assert( strlen30(pPreStmt->zSql)==pPreStmt->nSql );
1395 assert( 0==memcmp(pPreStmt->zSql, zSql, pPreStmt->nSql) );
1531 Tcl_Obj *pSql; /* Object holding string zSql */
1532 const char *zSql; /* Remaining SQL to execute */
1579 p->zSql = Tcl_GetString(pSql);
1652 const char *zPrevSql = 0; /* Previous value of p->zSql */
1654 while( p->zSql[0] || p->pPreStmt ){
1657 zPrevSql = (p->zSql==zPrevSql ? 0 : p->zSql);
1658 rc = dbPrepareAndBind(p->pDb, p->zSql, &p->zSql, &p->pPreStmt);
1693 p->zSql = zPrevSql;
2436 char *zSql; /* An SQL statement */
2482 zSql = sqlite3_mprintf("SELECT * FROM '%q'", zTable);
2483 if( zSql==0 ){
2487 nByte = strlen30(zSql);
2488 rc = sqlite3_prepare(pDb->db, zSql, -1, &pStmt, 0);
2489 sqlite3_free(zSql);
2500 zSql = malloc( nByte + 50 + nCol*2 );
2501 if( zSql==0 ) {
2505 sqlite3_snprintf(nByte+50, zSql, "INSERT OR %q INTO '%q' VALUES(?",
2507 j = strlen30(zSql);
2509 zSql[j++] = ',';
2510 zSql[j++] = '?';
2512 zSql[j++] = ')';
2513 zSql[j] = 0;
2514 rc = sqlite3_prepare(pDb->db, zSql, -1, &pStmt, 0);
2515 free(zSql);