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

Function recoverPrepare

modules/dasSQLITE/sqlite/shell.c:13909–13921  ·  view source on GitHub ↗

** This function is a no-op if recover handle p already contains an error ** (if p->errCode!=SQLITE_OK). ** ** Otherwise, it attempts to prepare the SQL statement in zSql against ** database handle db. If successful, the statement handle is returned. ** Or, if an error occurs, NULL is returned and an error left in the ** recover handle. */

Source from the content-addressed store, hash-verified

13907** recover handle.
13908*/
13909static sqlite3_stmt *recoverPrepare(
13910 sqlite3_recover *p,
13911 sqlite3 *db,
13912 const char *zSql
13913){
13914 sqlite3_stmt *pStmt = 0;
13915 if( p->errCode==SQLITE_OK ){
13916 if( sqlite3_prepare_v2(db, zSql, -1, &pStmt, 0) ){
13917 recoverDbError(p, db);
13918 }
13919 }
13920 return pStmt;
13921}
13922
13923/*
13924** This function is a no-op if recover handle p already contains an error

Callers 10

recoverPreparePrintfFunction · 0.85
recoverWriteSchema1Function · 0.85
recoverWriteSchema2Function · 0.85
recoverInsertStmtFunction · 0.85
recoverLostAndFound3InitFunction · 0.85
recoverWriteDataInitFunction · 0.85
recoverLostAndFound1InitFunction · 0.85
recoverLostAndFound2InitFunction · 0.85

Calls 1

recoverDbErrorFunction · 0.85

Tested by

no test coverage detected