Home
last modified time | relevance | path

Searched refs:zSql (Results 1 – 25 of 60) sorted by relevance

123

/external/chromium_org/third_party/sqlite/src/src/
Dcomplete.c104 int sqlite3_complete(const char *zSql){ in sqlite3_complete() argument
137 while( *zSql ){ in sqlite3_complete()
138 switch( *zSql ){ in sqlite3_complete()
152 if( zSql[1]!='*' ){ in sqlite3_complete()
156 zSql += 2; in sqlite3_complete()
157 while( zSql[0] && (zSql[0]!='*' || zSql[1]!='/') ){ zSql++; } in sqlite3_complete()
158 if( zSql[0]==0 ) return 0; in sqlite3_complete()
159 zSql++; in sqlite3_complete()
164 if( zSql[1]!='-' ){ in sqlite3_complete()
168 while( *zSql && *zSql!='\n' ){ zSql++; } in sqlite3_complete()
[all …]
Dlegacy.c32 const char *zSql, /* The SQL to be executed */ in sqlite3_exec() argument
45 if( zSql==0 ) zSql = ""; in sqlite3_exec()
49 while( (rc==SQLITE_OK || (rc==SQLITE_SCHEMA && (++nRetry)<2)) && zSql[0] ){ in sqlite3_exec()
54 rc = sqlite3_prepare(db, zSql, -1, &pStmt, &zLeftover); in sqlite3_exec()
61 zSql = zLeftover; in sqlite3_exec()
113 zSql = zLeftover; in sqlite3_exec()
114 while( sqlite3Isspace(zSql[0]) ) zSql++; in sqlite3_exec()
Dprepare.c316 char *zSql; in sqlite3InitOne() local
317 zSql = sqlite3MPrintf(db, in sqlite3InitOne()
326 rc = sqlite3_exec(db, zSql, sqlite3InitCallback, &initData, 0); in sqlite3InitOne()
332 sqlite3DbFree(db, zSql); in sqlite3InitOne()
523 const char *zSql, /* UTF-8 encoded SQL statement. */ in sqlite3Prepare() argument
587 if( nBytes>=0 && (nBytes==0 || zSql[nBytes-1]!=0) ){ in sqlite3Prepare()
597 zSqlCopy = sqlite3DbStrNDup(db, zSql, nBytes); in sqlite3Prepare()
601 pParse->zTail = &zSql[pParse->zTail-zSqlCopy]; in sqlite3Prepare()
603 pParse->zTail = &zSql[nBytes]; in sqlite3Prepare()
606 sqlite3RunParser(pParse, zSql, &zErrMsg); in sqlite3Prepare()
[all …]
Dtest_schema.c176 char *zSql = 0; in schemaNext() local
196 zSql = sqlite3_mprintf( in schemaNext()
201 zSql = sqlite3_mprintf( in schemaNext()
206 if( !zSql ){ in schemaNext()
211 rc = sqlite3_prepare(pVtab->db, zSql, -1, &pCur->pTableList, 0); in schemaNext()
212 sqlite3_free(zSql); in schemaNext()
220 zSql = sqlite3_mprintf("PRAGMA %Q.table_info(%Q)", in schemaNext()
225 if( !zSql ){ in schemaNext()
229 rc = sqlite3_prepare(pVtab->db, zSql, -1, &pCur->pColumnList, 0); in schemaNext()
230 sqlite3_free(zSql); in schemaNext()
Dvacuum.c37 static int execSql(sqlite3 *db, char **pzErrMsg, const char *zSql){ in execSql() argument
40 if( !zSql ){ in execSql()
43 if( SQLITE_OK!=sqlite3_prepare(db, zSql, -1, &pStmt, 0) ){ in execSql()
56 static int execExecSql(sqlite3 *db, char **pzErrMsg, const char *zSql){ in execExecSql() argument
60 rc = sqlite3_prepare(db, zSql, -1, &pStmt, 0); in execExecSql()
99 char *zSql = 0; /* SQL statements */ in sqlite3RunVacuum() local
148 zSql = "ATTACH ':memory:' AS vacuum_db;"; in sqlite3RunVacuum()
150 zSql = "ATTACH '' AS vacuum_db;"; in sqlite3RunVacuum()
152 rc = execSql(db, pzErrMsg, zSql); in sqlite3RunVacuum()
Dtest8.c162 char *zSql; in getColumnNames() local
171 zSql = sqlite3_mprintf("SELECT * FROM %Q", zTab); in getColumnNames()
172 if( !zSql ){ in getColumnNames()
176 rc = sqlite3_prepare(db, zSql, -1, &pStmt, 0); in getColumnNames()
177 sqlite3_free(zSql); in getColumnNames()
244 char *zSql; in getIndexArray() local
254 zSql = sqlite3_mprintf("PRAGMA index_list(%s)", zTab); in getIndexArray()
255 if( !zSql ){ in getIndexArray()
259 rc = sqlite3_prepare(db, zSql, -1, &pStmt, 0); in getIndexArray()
260 sqlite3_free(zSql); in getIndexArray()
[all …]
Dshell.c1064 const char *zSql, /* SQL to be evaluated */ in shell_exec() argument
1078 while( zSql[0] && (SQLITE_OK == rc) ){ in shell_exec()
1079 rc = sqlite3_prepare_v2(db, zSql, -1, &pStmt, &zLeftover); in shell_exec()
1087 zSql = zLeftover; in shell_exec()
1088 while( isspace(zSql[0]) ) zSql++; in shell_exec()
1101 fprintf(pArg->out, "%s\n", zStmtSql ? zStmtSql : zSql); in shell_exec()
1167 zSql = zLeftover; in shell_exec()
1168 while( isspace(zSql[0]) ) zSql++; in shell_exec()
1194 const char *zSql; in dump_callback() local
1202 zSql = azArg[2]; in dump_callback()
[all …]
Dtokenize.c388 int sqlite3RunParser(Parse *pParse, const char *zSql, char **pzErrMsg){ in sqlite3RunParser() argument
404 pParse->zTail = zSql; in sqlite3RunParser()
420 while( !db->mallocFailed && zSql[i]!=0 ){ in sqlite3RunParser()
422 pParse->sLastToken.z = &zSql[i]; in sqlite3RunParser()
423 pParse->sLastToken.n = sqlite3GetToken((unsigned char*)&zSql[i],&tokenType); in sqlite3RunParser()
446 pParse->zTail = &zSql[i]; in sqlite3RunParser()
460 if( zSql[i]==0 && nErr==0 && pParse->rc==SQLITE_OK ){ in sqlite3RunParser()
463 pParse->zTail = &zSql[i]; in sqlite3RunParser()
Dvdbetrace.c27 static int findNextHostParameter(const char *zSql, int *pnToken){ in findNextHostParameter() argument
33 while( zSql[0] ){ in findNextHostParameter()
34 n = sqlite3GetToken((u8*)zSql, &tokenType); in findNextHostParameter()
41 zSql += n; in findNextHostParameter()
Dalter.c42 unsigned char const *zSql = sqlite3_value_text(argv[0]); in renameTableFunc() local
47 unsigned char const *zCsr = zSql; in renameTableFunc()
59 if( zSql ){ in renameTableFunc()
80 zRet = sqlite3MPrintf(db, "%.*s\"%w\"%s", ((u8*)tname.z) - zSql, zSql, in renameTableFunc()
162 unsigned char const *zSql = sqlite3_value_text(argv[0]); in renameTriggerFunc() local
168 unsigned char const *zCsr = zSql; in renameTriggerFunc()
180 if( zSql ){ in renameTriggerFunc()
219 zRet = sqlite3MPrintf(db, "%.*s\"%w\"%s", ((u8*)tname.z) - zSql, zSql, in renameTriggerFunc()
Dtclsqlite.c100 const char *zSql; /* Text of the SQL statement */ member
537 static void DbTraceHandler(void *cd, const char *zSql){ in DbTraceHandler() argument
543 Tcl_DStringAppendElement(&str, zSql); in DbTraceHandler()
555 static void DbProfileHandler(void *cd, const char *zSql, sqlite_uint64 tm){ in DbProfileHandler() argument
563 Tcl_DStringAppendElement(&str, zSql); in DbProfileHandler()
1054 const char *zSql = zIn; /* Pointer to first SQL statement in zIn */ in dbPrepareAndBind() local
1066 while( isspace(zSql[0]) ){ zSql++; } in dbPrepareAndBind()
1067 nSql = strlen30(zSql); in dbPrepareAndBind()
1072 && memcmp(pPreStmt->zSql, zSql, n)==0 in dbPrepareAndBind()
1073 && (zSql[n]==0 || zSql[n-1]==';') in dbPrepareAndBind()
[all …]
Dtest_thread.c510 const char *zSql, /* UTF-8 encoded SQL statement. */ in sqlite3_blocking_prepare_v2() argument
516 while( SQLITE_LOCKED==(rc = sqlite3_prepare_v2(db, zSql, nSql, ppStmt, pz)) ){ in sqlite3_blocking_prepare_v2()
562 const char *zSql; in blocking_prepare_v2_proc() local
576 zSql = Tcl_GetString(objv[2]); in blocking_prepare_v2_proc()
580 rc = sqlite3_blocking_prepare_v2(db, zSql, bytes, &pStmt, &zTail); in blocking_prepare_v2_proc()
582 rc = sqlite3_prepare_v2(db, zSql, bytes, &pStmt, &zTail); in blocking_prepare_v2_proc()
588 bytes = bytes - (zTail-zSql); in blocking_prepare_v2_proc()
Dtest_intarray.c236 char *zSql; in sqlite3_intarray_create() local
237 zSql = sqlite3_mprintf("CREATE VIRTUAL TABLE temp.%Q USING %Q", in sqlite3_intarray_create()
239 rc = sqlite3_exec(db, zSql, 0, 0, 0); in sqlite3_intarray_create()
240 sqlite3_free(zSql); in sqlite3_intarray_create()
Danalyze.c604 char *zSql; in sqlite3AnalysisLoad() local
627 zSql = sqlite3MPrintf(db, in sqlite3AnalysisLoad()
629 if( zSql==0 ){ in sqlite3AnalysisLoad()
632 rc = sqlite3_exec(db, zSql, analysisLoader, &sInfo, 0); in sqlite3AnalysisLoad()
633 sqlite3DbFree(db, zSql); in sqlite3AnalysisLoad()
645 zSql = sqlite3MPrintf(db, in sqlite3AnalysisLoad()
647 if( !zSql ){ in sqlite3AnalysisLoad()
650 rc = sqlite3_prepare(db, zSql, -1, &pStmt, 0); in sqlite3AnalysisLoad()
651 sqlite3DbFree(db, zSql); in sqlite3AnalysisLoad()
Dtest1.c315 char *zSql; in test_exec_printf() local
324 zSql = sqlite3_mprintf(argv[2], argv[3]); in test_exec_printf()
325 rc = sqlite3_exec(db, zSql, exec_printf_cb, &str, &zErr); in test_exec_printf()
326 sqlite3_free(zSql); in test_exec_printf()
354 char zSql[500]; in test_exec_hex() local
363 for(i=j=0; i<sizeof(zSql) && zHex[j]; i++, j++){ in test_exec_hex()
365 zSql[i] = (testHexToInt(zHex[j+1])<<4) + testHexToInt(zHex[j+2]); in test_exec_hex()
368 zSql[i] = zHex[j]; in test_exec_hex()
371 zSql[i] = 0; in test_exec_hex()
373 rc = sqlite3_exec(db, zSql, exec_printf_cb, &str, &zErr); in test_exec_hex()
[all …]
/external/chromium_org/third_party/sqlite/src/tool/
Dspeedtest8inst1.c37 static void prepareAndRun(sqlite3_vfs *pInstVfs, sqlite3 *db, const char *zSql){ in prepareAndRun() argument
46 sqlite3_snprintf(1023, zMessage, "sqlite3_prepare_v2: %s", zSql); in prepareAndRun()
50 rc = sqlite3_prepare_v2(db, zSql, -1, &pStmt, &stmtTail); in prepareAndRun()
52 sqlite3_instvfs_binarylog_call(pInstVfs,BINARYLOG_PREPARE_V2,iTime,rc,zSql); in prepareAndRun()
57 sqlite3_snprintf(1023, zMessage, "sqlite3_step loop: %s", zSql); in prepareAndRun()
62 sqlite3_instvfs_binarylog_call(pInstVfs, BINARYLOG_STEP, iTime, rc, zSql); in prepareAndRun()
64 sqlite3_snprintf(1023, zMessage, "sqlite3_finalize: %s", zSql); in prepareAndRun()
69 sqlite3_instvfs_binarylog_call(pInstVfs, BINARYLOG_FINALIZE, iTime, rc, zSql); in prepareAndRun()
147 char *zSql = 0; in main() local
175 zSql = readScriptFile(zScript, &nSql); in main()
[all …]
Dspeedtest16.c66 static void prepareAndRun(sqlite3 *db, const char *zSql){ in prepareAndRun() argument
74 printf("SQL statement: [%s]\n", zSql); in prepareAndRun()
75 utf16 = asciiToUtf16le(zSql); in prepareAndRun()
103 char *zSql; in main() local
120 zSql = malloc( nSql+1 ); in main()
122 nSql = fread(zSql, 1, nSql, in); in main()
123 zSql[nSql] = 0; in main()
135 if( zSql[j]==';' ){ in main()
137 char c = zSql[j+1]; in main()
138 zSql[j+1] = 0; in main()
[all …]
Dspeedtest8.c56 static void prepareAndRun(sqlite3 *db, const char *zSql, int bQuiet){ in prepareAndRun() argument
65 if (!bQuiet) printf("SQL statement: [%s]\n", zSql); in prepareAndRun()
67 rc = sqlite3_prepare_v2(db, zSql, -1, &pStmt, &stmtTail); in prepareAndRun()
97 char *zSql; in main() local
189 zSql = malloc( nSql+1 ); in main()
191 nSql = fread(zSql, 1, nSql, in); in main()
192 zSql[nSql] = 0; in main()
205 if( zSql[j]==';' ){ in main()
207 char c = zSql[j+1]; in main()
208 zSql[j+1] = 0; in main()
[all …]
/external/chromium_org/third_party/sqlite/src/test/
Dthreadtest1.c103 char *zSql; in db_query() local
109 zSql = sqlite3_vmprintf(zFormat, ap); in db_query()
113 if( verbose ) printf("QUERY %s: %s\n", zFile, zSql); in db_query()
114 rc = sqlite3_exec(db, zSql, db_query_callback, &sResult, &zErrMsg); in db_query()
117 rc = sqlite3_exec(db, zSql, db_query_callback, &sResult, &zErrMsg); in db_query()
119 if( verbose ) printf("DONE %s %s\n", zFile, zSql); in db_query()
121 fprintf(stdout,"%s: query failed: %s - %s\n", zFile, zSql, zErrMsg); in db_query()
123 free(zSql); in db_query()
126 sqlite3_free(zSql); in db_query()
138 char *zSql; in db_execute() local
[all …]
Dthreadtest3.c552 const char *zSql /* SQL script to execute */ in sql_script_x() argument
555 pErr->rc = sqlite3_exec(pDb->db, zSql, 0, 0, &pErr->zErr); in sql_script_x()
562 const char *zSql /* SQL statement */ in getSqlStatement() argument
568 if( 0==strcmp(sqlite3_sql(pRet->pStmt), zSql) ){ in getSqlStatement()
574 rc = sqlite3_prepare_v2(pDb->db, zSql, -1, &pRet->pStmt, 0); in getSqlStatement()
579 assert( 0==strcmp(sqlite3_sql(pRet->pStmt), zSql) ); in getSqlStatement()
1294 char *zSql = sqlite3_mprintf( in dynamic_triggers_1() local
1299 execsql(&err, &db, zSql); in dynamic_triggers_1()
1300 sqlite3_free(zSql); in dynamic_triggers_1()
1305 char *zSql = sqlite3_mprintf( in dynamic_triggers_1() local
[all …]
Dthread005.test35 proc runsql {zSql {db {}}} {
37 while {$rc=="SQLITE_OK" && $zSql ne ""} {
38 set STMT [sqlite3_prepare_v2 $db $zSql -1 zSql]
140 proc execsql {zSql {db {}}} {
146 while {$rc=="SQLITE_OK" && $zSql ne ""} {
147 set STMT [sqlite3_prepare_v2 $db $zSql -1 zSql]
Dtrace2.test29 proc sql {zSql} { db one $zSql }
30 proc trace {zSql} { lappend ::trace $zSql }
/external/sqlite/dist/
Dshell.c1212 const char *zSql; /* The text of the SQL statement */ in explain_data_prepare() local
1225 zSql = sqlite3_sql(pSql); in explain_data_prepare()
1226 if( zSql==0 ) return; in explain_data_prepare()
1227 for(z=zSql; *z==' ' || *z=='\t' || *z=='\n' || *z=='\f' || *z=='\r'; z++); in explain_data_prepare()
1289 const char *zSql, /* SQL to be evaluated */ in shell_exec() argument
1304 while( zSql[0] && (SQLITE_OK == rc) ){ in shell_exec()
1305 rc = sqlite3_prepare_v2(db, zSql, -1, &pStmt, &zLeftover); in shell_exec()
1313 zSql = zLeftover; in shell_exec()
1314 while( IsSpace(zSql[0]) ) zSql++; in shell_exec()
1327 fprintf(pArg->out, "%s\n", zStmtSql ? zStmtSql : zSql); in shell_exec()
[all …]
/external/sqlite/dist/orig/
Dshell.c1207 const char *zSql; /* The text of the SQL statement */ in explain_data_prepare() local
1220 zSql = sqlite3_sql(pSql); in explain_data_prepare()
1221 if( zSql==0 ) return; in explain_data_prepare()
1222 for(z=zSql; *z==' ' || *z=='\t' || *z=='\n' || *z=='\f' || *z=='\r'; z++); in explain_data_prepare()
1284 const char *zSql, /* SQL to be evaluated */ in shell_exec() argument
1299 while( zSql[0] && (SQLITE_OK == rc) ){ in shell_exec()
1300 rc = sqlite3_prepare_v2(db, zSql, -1, &pStmt, &zLeftover); in shell_exec()
1308 zSql = zLeftover; in shell_exec()
1309 while( IsSpace(zSql[0]) ) zSql++; in shell_exec()
1322 fprintf(pArg->out, "%s\n", zStmtSql ? zStmtSql : zSql); in shell_exec()
[all …]
/external/chromium_org/third_party/sqlite/src/ext/fts2/
Dfts2_tokenizer.c230 const char zSql[] = "SELECT fts2_tokenizer(?, ?)"; in registerTokenizer() local
232 rc = sqlite3_prepare_v2(db, zSql, -1, &pStmt, 0); in registerTokenizer()
252 const char zSql[] = "SELECT fts2_tokenizer(?)"; in queryFts2Tokenizer() local
255 rc = sqlite3_prepare_v2(db, zSql, -1, &pStmt, 0); in queryFts2Tokenizer()

123