diff options
author | drh <drh@noemail.net> | 2006-07-08 17:06:43 +0000 |
---|---|---|
committer | drh <drh@noemail.net> | 2006-07-08 17:06:43 +0000 |
commit | b7f6f68f3a161bdea15b435a1e6666e33f7865b2 (patch) | |
tree | c9a707e93523b2526e14e61d8c34962cf11ef312 /src/expr.c | |
parent | 4144905b531ccf12ee33a62a2f6de1331908a11d (diff) | |
download | sqlite-b7f6f68f3a161bdea15b435a1e6666e33f7865b2.tar.gz sqlite-b7f6f68f3a161bdea15b435a1e6666e33f7865b2.zip |
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
Diffstat (limited to 'src/expr.c')
-rw-r--r-- | src/expr.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/expr.c b/src/expr.c index 43e1c715e..66a7158e2 100644 --- a/src/expr.c +++ b/src/expr.c @@ -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); |