MCPcopy Create free account
hub / github.com/GaijinEntertainment/daScript / idxPrintfPrepareStmt

Function idxPrintfPrepareStmt

modules/dasSQLITE/sqlite/shell.c:10541–10561  ·  view source on GitHub ↗

** Prepare an SQL statement using the results of a printf() formatting. */

Source from the content-addressed store, hash-verified

10539** Prepare an SQL statement using the results of a printf() formatting.
10540*/
10541static int idxPrintfPrepareStmt(
10542 sqlite3 *db, /* Database handle to compile against */
10543 sqlite3_stmt **ppStmt, /* OUT: Compiled SQL statement */
10544 char **pzErrmsg, /* OUT: sqlite3_malloc()ed error message */
10545 const char *zFmt, /* printf() format of SQL statement */
10546 ... /* Trailing printf() arguments */
10547){
10548 va_list ap;
10549 int rc;
10550 char *zSql;
10551 va_start(ap, zFmt);
10552 zSql = sqlite3_vmprintf(zFmt, ap);
10553 if( zSql==0 ){
10554 rc = SQLITE_NOMEM;
10555 }else{
10556 rc = idxPrepareStmt(db, ppStmt, pzErrmsg, zSql);
10557 sqlite3_free(zSql);
10558 }
10559 va_end(ap);
10560 return rc;
10561}
10562
10563
10564/*************************************************************************

Callers 6

expertFilterFunction · 0.85
idxGetTableInfoFunction · 0.85
idxFindCompatibleFunction · 0.85
idxFindIndexesFunction · 0.85
idxProcessOneTriggerFunction · 0.85
sqlite3_expert_newFunction · 0.85

Calls 1

idxPrepareStmtFunction · 0.85

Tested by

no test coverage detected