org.gibello.zql.data
Class ZEval

java.lang.Object
  extended by org.gibello.zql.data.ZEval

public class ZEval
extends java.lang.Object

Evaluate SQL expressions


Constructor Summary
ZEval()
           
 
Method Summary
 boolean eval(ZTuple tuple, ZExp exp)
          Evaluate a boolean expression to true or false (for example, SQL WHERE clauses are boolean expressions)
 java.lang.Object evalExpValue(ZTuple tuple, ZExp exp)
          Evaluate a numeric or string expression (example: a+1)
static void main(java.lang.String[] args)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ZEval

public ZEval()
Method Detail

eval

public boolean eval(ZTuple tuple,
                    ZExp exp)
             throws java.sql.SQLException
Evaluate a boolean expression to true or false (for example, SQL WHERE clauses are boolean expressions)

Parameters:
tuple - The tuple on which to evaluate the expression
exp - The expression to evaluate
Returns:
true if the expression evaluate to true for this tuple, false if not.
Throws:
java.sql.SQLException

evalExpValue

public java.lang.Object evalExpValue(ZTuple tuple,
                                     ZExp exp)
                              throws java.sql.SQLException
Evaluate a numeric or string expression (example: a+1)

Parameters:
tuple - The tuple on which to evaluate the expression
exp - The expression to evaluate
Returns:
The expression's value
Throws:
java.sql.SQLException

main

public static void main(java.lang.String[] args)