aboutsummaryrefslogtreecommitdiff
path: root/src/expr.c
diff options
context:
space:
mode:
authordrh <drh@noemail.net>2003-09-06 01:10:47 +0000
committerdrh <drh@noemail.net>2003-09-06 01:10:47 +0000
commit50457896949ecd79711237b78db2f25d5a664919 (patch)
tree753a3c6337e64d27281150670bbf22ccc0c4707a /src/expr.c
parentc023e03ea52001734f5e6dfd65304eadd2ed9b38 (diff)
downloadsqlite-50457896949ecd79711237b78db2f25d5a664919.tar.gz
sqlite-50457896949ecd79711237b78db2f25d5a664919.zip
The beginnings of changes to support pre-compiled SQL. Mostly untested,
though all regression tests to pass. (CVS 1093) FossilOrigin-Name: 912f47c72d3597c6d5acff765d94922bd660339a
Diffstat (limited to 'src/expr.c')
-rw-r--r--src/expr.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/expr.c b/src/expr.c
index 804e751b7..46bd04d47 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.98 2003/07/30 12:34:12 drh Exp $
+** $Id: expr.c,v 1.99 2003/09/06 01:10:47 drh Exp $
*/
#include "sqliteInt.h"
#include <ctype.h>
@@ -310,6 +310,7 @@ int sqliteExprIsConstant(Expr *p){
case TK_STRING:
case TK_INTEGER:
case TK_FLOAT:
+ case TK_VARIABLE:
return 1;
default: {
if( p->pLeft && !sqliteExprIsConstant(p->pLeft) ) return 0;
@@ -914,6 +915,7 @@ int sqliteExprType(Expr *p){
case TK_STRING:
case TK_NULL:
case TK_CONCAT:
+ case TK_VARIABLE:
return SQLITE_SO_TEXT;
case TK_LT:
@@ -1043,6 +1045,10 @@ void sqliteExprCode(Parse *pParse, Expr *pExpr){
sqliteVdbeAddOp(v, OP_String, 0, 0);
break;
}
+ case TK_VARIABLE: {
+ sqliteVdbeAddOp(v, OP_Variable, atoi(&pExpr->token.z[1]), 0);
+ break;
+ }
case TK_LT:
case TK_LE:
case TK_GT: