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

Function expertFilter

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

** Virtual table module xFilter method. */

Source from the content-addressed store, hash-verified

8966** Virtual table module xFilter method.
8967*/
8968static int expertFilter(
8969 sqlite3_vtab_cursor *cur,
8970 int idxNum, const char *idxStr,
8971 int argc, sqlite3_value **argv
8972){
8973 ExpertCsr *pCsr = (ExpertCsr*)cur;
8974 ExpertVtab *pVtab = (ExpertVtab*)(cur->pVtab);
8975 sqlite3expert *pExpert = pVtab->pExpert;
8976 int rc;
8977
8978 (void)idxNum;
8979 (void)idxStr;
8980 (void)argc;
8981 (void)argv;
8982 rc = sqlite3_finalize(pCsr->pData);
8983 pCsr->pData = 0;
8984 if( rc==SQLITE_OK ){
8985 rc = idxPrintfPrepareStmt(pExpert->db, &pCsr->pData, &pVtab->base.zErrMsg,
8986 "SELECT * FROM main.%Q WHERE sample()", pVtab->pTab->zName
8987 );
8988 }
8989
8990 if( rc==SQLITE_OK ){
8991 rc = expertNext(cur);
8992 }
8993 return rc;
8994}
8995
8996static int idxRegisterVtab(sqlite3expert *p){
8997 static sqlite3_module expertModule = {

Callers

nothing calls this directly

Calls 2

idxPrintfPrepareStmtFunction · 0.85
expertNextFunction · 0.85

Tested by

no test coverage detected