MCPcopy Create free account
hub / github.com/Kitware/VTK / shellPreparePrintf

Function shellPreparePrintf

ThirdParty/sqlite/vtksqlite/shell.c:26975–26996  ·  view source on GitHub ↗

** Create a prepared statement using printf-style arguments for the SQL. */

Source from the content-addressed store, hash-verified

26973** Create a prepared statement using printf-style arguments for the SQL.
26974*/
26975static void shellPreparePrintf(
26976 sqlite3 *db,
26977 int *pRc,
26978 sqlite3_stmt **ppStmt,
26979 const char *zFmt,
26980 ...
26981){
26982 *ppStmt = 0;
26983 if( *pRc==SQLITE_OK ){
26984 va_list ap;
26985 char *z;
26986 va_start(ap, zFmt);
26987 z = sqlite3_vmprintf(zFmt, ap);
26988 va_end(ap);
26989 if( z==0 ){
26990 *pRc = SQLITE_NOMEM;
26991 }else{
26992 shellPrepare(db, pRc, z, ppStmt);
26993 sqlite3_free(z);
26994 }
26995 }
26996}
26997
26998/*
26999** Finalize the prepared statement created using shellPreparePrintf().

Callers 4

arCheckEntriesFunction · 0.85
arListCommandFunction · 0.85
arExtractCommandFunction · 0.85
outputDumpWarningFunction · 0.85

Calls 1

shellPrepareFunction · 0.85

Tested by

no test coverage detected