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

Function idxLargestIndex

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

Source from the content-addressed store, hash-verified

9871}
9872
9873static int idxLargestIndex(sqlite3 *db, int *pnMax, char **pzErr){
9874 int rc = SQLITE_OK;
9875 const char *zMax =
9876 "SELECT max(i.seqno) FROM "
9877 " sqlite_schema AS s, "
9878 " pragma_index_list(s.name) AS l, "
9879 " pragma_index_info(l.name) AS i "
9880 "WHERE s.type = 'table'";
9881 sqlite3_stmt *pMax = 0;
9882
9883 *pnMax = 0;
9884 rc = idxPrepareStmt(db, &pMax, pzErr, zMax);
9885 if( rc==SQLITE_OK && SQLITE_ROW==sqlite3_step(pMax) ){
9886 *pnMax = sqlite3_column_int(pMax, 0) + 1;
9887 }
9888 idxFinalize(&rc, pMax);
9889
9890 return rc;
9891}
9892
9893static int idxPopulateOneStat1(
9894 sqlite3expert *p,

Callers 1

idxPopulateStat1Function · 0.85

Calls 2

idxPrepareStmtFunction · 0.85
idxFinalizeFunction · 0.85

Tested by

no test coverage detected