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

Function db_int

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

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

Source from the content-addressed store, hash-verified

15525** Run an SQL command and return the single integer result.
15526*/
15527static int db_int(ShellState *p, const char *zSql){
15528 sqlite3_stmt *pStmt;
15529 int res = 0;
15530 sqlite3_prepare_v2(p->db, zSql, -1, &pStmt, 0);
15531 if( pStmt && sqlite3_step(pStmt)==SQLITE_ROW ){
15532 res = sqlite3_column_int(pStmt,0);
15533 }
15534 sqlite3_finalize(pStmt);
15535 return res;
15536}
15537
15538/*
15539** Convert a 2-byte or 4-byte big-endian integer into a native integer

Callers 1

shell_dbinfo_commandFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected