1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-08 03:22:21 +03:00

Allow virtual table implementations to overload function that use

a column of the virtual table as their first argument.  Untested. (CVS 3322)

FossilOrigin-Name: 12cc7af4b6b8b4f1a43d962fbafde8cba683a907
This commit is contained in:
drh
2006-07-08 17:06:43 +00:00
parent 4144905b53
commit b7f6f68f3a
10 changed files with 117 additions and 23 deletions

View File

@@ -12,7 +12,7 @@
** This file contains routines used for analyzing expressions and
** for generating VDBE code that evaluates expressions in SQLite.
**
** $Id: expr.c,v 1.262 2006/06/14 19:00:21 drh Exp $
** $Id: expr.c,v 1.263 2006/07/08 17:06:44 drh Exp $
*/
#include "sqliteInt.h"
#include <ctype.h>
@@ -1674,6 +1674,11 @@ void sqlite3ExprCode(Parse *pParse, Expr *pExpr){
pDef = sqlite3FindFunction(pParse->db, zId, nId, nExpr, enc, 0);
assert( pDef!=0 );
nExpr = sqlite3ExprCodeExprList(pParse, pList);
#ifndef SQLITE_OMIT_VIRTUALTABLE
if( nExpr>0 ){
pDef = sqlite3VtabOverloadFunction(pDef, nExpr, pList->a[0].pExpr);
}
#endif
for(i=0; i<nExpr && i<32; i++){
if( sqlite3ExprIsConstant(pList->a[i].pExpr) ){
constMask |= (1<<i);