mirror of
https://github.com/sqlite/sqlite.git
synced 2026-01-06 08:01:16 +03:00
Add the "unionvtab" virtual table extension in ext/misc/unionvtab.c.
FossilOrigin-Name: 62a86aa6c0519cf1fa232169122d3d6ae8d2f66b20530fb934a82a15712bd2f0
This commit is contained in:
10
src/pragma.c
10
src/pragma.c
@@ -2371,10 +2371,14 @@ static int pragmaVtabFilter(
|
||||
pragmaVtabCursorClear(pCsr);
|
||||
j = (pTab->pName->mPragFlg & PragFlg_Result1)!=0 ? 0 : 1;
|
||||
for(i=0; i<argc; i++, j++){
|
||||
const char *zText = (const char*)sqlite3_value_text(argv[i]);
|
||||
assert( j<ArraySize(pCsr->azArg) );
|
||||
pCsr->azArg[j] = sqlite3_mprintf("%s", sqlite3_value_text(argv[i]));
|
||||
if( pCsr->azArg[j]==0 ){
|
||||
return SQLITE_NOMEM;
|
||||
assert( pCsr->azArg[j]==0 );
|
||||
if( zText ){
|
||||
pCsr->azArg[j] = sqlite3_mprintf("%s", zText);
|
||||
if( pCsr->azArg[j]==0 ){
|
||||
return SQLITE_NOMEM;
|
||||
}
|
||||
}
|
||||
}
|
||||
sqlite3StrAccumInit(&acc, 0, 0, 0, pTab->db->aLimit[SQLITE_LIMIT_SQL_LENGTH]);
|
||||
|
||||
@@ -6920,6 +6920,7 @@ static int SQLITE_TCLAPI tclLoadStaticExtensionCmd(
|
||||
extern int sqlite3_spellfix_init(sqlite3*,char**,const sqlite3_api_routines*);
|
||||
extern int sqlite3_totype_init(sqlite3*,char**,const sqlite3_api_routines*);
|
||||
extern int sqlite3_wholenumber_init(sqlite3*,char**,const sqlite3_api_routines*);
|
||||
extern int sqlite3_unionvtab_init(sqlite3*,char**,const sqlite3_api_routines*);
|
||||
static const struct {
|
||||
const char *zExtName;
|
||||
int (*pInit)(sqlite3*,char**,const sqlite3_api_routines*);
|
||||
@@ -6939,6 +6940,7 @@ static int SQLITE_TCLAPI tclLoadStaticExtensionCmd(
|
||||
{ "series", sqlite3_series_init },
|
||||
{ "spellfix", sqlite3_spellfix_init },
|
||||
{ "totype", sqlite3_totype_init },
|
||||
{ "unionvtab", sqlite3_unionvtab_init },
|
||||
{ "wholenumber", sqlite3_wholenumber_init },
|
||||
};
|
||||
sqlite3 *db;
|
||||
|
||||
Reference in New Issue
Block a user