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

Function db_int

modules/dasSQLITE/sqlite/shell.c:21281–21290  ·  view source on GitHub ↗

** Run an SQL command and return the single integer result. */

Source from the content-addressed store, hash-verified

21279** Run an SQL command and return the single integer result.
21280*/
21281static int db_int(sqlite3 *db, const char *zSql){
21282 sqlite3_stmt *pStmt;
21283 int res = 0;
21284 sqlite3_prepare_v2(db, zSql, -1, &pStmt, 0);
21285 if( pStmt && sqlite3_step(pStmt)==SQLITE_ROW ){
21286 res = sqlite3_column_int(pStmt,0);
21287 }
21288 sqlite3_finalize(pStmt);
21289 return res;
21290}
21291
21292#if defined(SQLITE_SHELL_HAVE_RECOVER)
21293/*

Callers 2

shell_dbinfo_commandFunction · 0.85
zAutoColumnFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected