MCPcopy Create free account
hub / github.com/audacity/audacity / idxPrintfPrepareStmt

Function idxPrintfPrepareStmt

lib-src/sqlite/shell.c:8698–8718  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

8696** Prepare an SQL statement using the results of a printf() formatting.
8697*/
8698static int idxPrintfPrepareStmt(
8699 sqlite3 *db, /* Database handle to compile against */
8700 sqlite3_stmt **ppStmt, /* OUT: Compiled SQL statement */
8701 char **pzErrmsg, /* OUT: sqlite3_malloc()ed error message */
8702 const char *zFmt, /* printf() format of SQL statement */
8703 ... /* Trailing printf() arguments */
8704){
8705 va_list ap;
8706 int rc;
8707 char *zSql;
8708 va_start(ap, zFmt);
8709 zSql = sqlite3_vmprintf(zFmt, ap);
8710 if( zSql==0 ){
8711 rc = SQLITE_NOMEM;
8712 }else{
8713 rc = idxPrepareStmt(db, ppStmt, pzErrmsg, zSql);
8714 sqlite3_free(zSql);
8715 }
8716 va_end(ap);
8717 return rc;
8718}
8719
8720
8721/*************************************************************************

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