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

Function idxBuildSampleTable

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

Source from the content-addressed store, hash-verified

9991}
9992
9993static int idxBuildSampleTable(sqlite3expert *p, const char *zTab){
9994 int rc;
9995 char *zSql;
9996
9997 rc = sqlite3_exec(p->dbv,"DROP TABLE IF EXISTS temp."UNIQUE_TABLE_NAME,0,0,0);
9998 if( rc!=SQLITE_OK ) return rc;
9999
10000 zSql = sqlite3_mprintf(
10001 "CREATE TABLE temp." UNIQUE_TABLE_NAME " AS SELECT * FROM %Q", zTab
10002 );
10003 if( zSql==0 ) return SQLITE_NOMEM;
10004 rc = sqlite3_exec(p->dbv, zSql, 0, 0, 0);
10005 sqlite3_free(zSql);
10006
10007 return rc;
10008}
10009
10010/*
10011** This function is called as part of sqlite3_expert_analyze(). Candidate

Callers 1

idxPopulateStat1Function · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected