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

Function expertFilter

modules/dasSQLITE/sqlite/shell.c:10811–10837  ·  view source on GitHub ↗

** Virtual table module xFilter method. */

Source from the content-addressed store, hash-verified

10809** Virtual table module xFilter method.
10810*/
10811static int expertFilter(
10812 sqlite3_vtab_cursor *cur,
10813 int idxNum, const char *idxStr,
10814 int argc, sqlite3_value **argv
10815){
10816 ExpertCsr *pCsr = (ExpertCsr*)cur;
10817 ExpertVtab *pVtab = (ExpertVtab*)(cur->pVtab);
10818 sqlite3expert *pExpert = pVtab->pExpert;
10819 int rc;
10820
10821 (void)idxNum;
10822 (void)idxStr;
10823 (void)argc;
10824 (void)argv;
10825 rc = sqlite3_finalize(pCsr->pData);
10826 pCsr->pData = 0;
10827 if( rc==SQLITE_OK ){
10828 rc = idxPrintfPrepareStmt(pExpert->db, &pCsr->pData, &pVtab->base.zErrMsg,
10829 "SELECT * FROM main.%Q WHERE sample()", pVtab->pTab->zName
10830 );
10831 }
10832
10833 if( rc==SQLITE_OK ){
10834 rc = expertNext(cur);
10835 }
10836 return rc;
10837}
10838
10839static int idxRegisterVtab(sqlite3expert *p){
10840 static sqlite3_module expertModule = {

Callers

nothing calls this directly

Calls 2

idxPrintfPrepareStmtFunction · 0.85
expertNextFunction · 0.85

Tested by

no test coverage detected