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

Function idxLargestIndex

modules/dasSQLITE/sqlite/shell.c:11780–11798  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

11778}
11779
11780static int idxLargestIndex(sqlite3 *db, int *pnMax, char **pzErr){
11781 int rc = SQLITE_OK;
11782 const char *zMax =
11783 "SELECT max(i.seqno) FROM "
11784 " sqlite_schema AS s, "
11785 " pragma_index_list(s.name) AS l, "
11786 " pragma_index_info(l.name) AS i "
11787 "WHERE s.type = 'table'";
11788 sqlite3_stmt *pMax = 0;
11789
11790 *pnMax = 0;
11791 rc = idxPrepareStmt(db, &pMax, pzErr, zMax);
11792 if( rc==SQLITE_OK && SQLITE_ROW==sqlite3_step(pMax) ){
11793 *pnMax = sqlite3_column_int(pMax, 0) + 1;
11794 }
11795 idxFinalize(&rc, pMax);
11796
11797 return rc;
11798}
11799
11800static int idxPopulateOneStat1(
11801 sqlite3expert *p,

Callers 1

idxPopulateStat1Function · 0.85

Calls 2

idxPrepareStmtFunction · 0.85
idxFinalizeFunction · 0.85

Tested by

no test coverage detected