com.caucho.db.fun
Class NowExpr

java.lang.Object
  extended by com.caucho.db.sql.Expr
      extended by com.caucho.db.sql.FunExpr
          extended by com.caucho.db.fun.NowExpr

public class NowExpr
extends FunExpr


Field Summary
protected static L10N L
           
 
Fields inherited from class com.caucho.db.sql.Expr
FALSE, TRUE, UNKNOWN
 
Constructor Summary
NowExpr()
           
 
Method Summary
protected  void addArg(Expr expr)
           
 double evalDouble(QueryContext context)
          Evaluates the expression as a double.
 long evalLong(QueryContext context)
          Evaluates the expression as a long.
 java.lang.String evalString(QueryContext context)
          Evaluates the expression as a string.
 java.lang.Class getType()
          Returns the expected result type of the expression.
 boolean isNull(QueryContext context)
          Returns true for a null value.
 
Methods inherited from class com.caucho.db.sql.Expr
bind, cost, createOrder, evalBoolean, evalBytes, evalDate, evalEqual, evalEqual, evalGroup, evalStream, evalToBuffer, evalToBuffer, evalToResult, getIndexExpr, getName, getSQLType, getTable, getTypeCode, indexCost, indexSubCost, initGroup, isBinaryStream, isBoolean, isDouble, isLong, isNullable, isParam, isSelect, splitAnd, subCost, updateDouble, updateLong, updateString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

L

protected static final L10N L
Constructor Detail

NowExpr

public NowExpr()
Method Detail

addArg

protected void addArg(Expr expr)
               throws java.sql.SQLException
Specified by:
addArg in class FunExpr
Throws:
java.sql.SQLException

getType

public java.lang.Class getType()
Returns the expected result type of the expression.

Overrides:
getType in class Expr

isNull

public boolean isNull(QueryContext context)
               throws java.sql.SQLException
Returns true for a null value.

Overrides:
isNull in class Expr
Parameters:
rows - the current tuple being evaluated
Returns:
true if null
Throws:
java.sql.SQLException

evalDouble

public double evalDouble(QueryContext context)
                  throws java.sql.SQLException
Evaluates the expression as a double.

Overrides:
evalDouble in class Expr
Parameters:
rows - the current tuple being evaluated
Returns:
the double value
Throws:
java.sql.SQLException

evalLong

public long evalLong(QueryContext context)
              throws java.sql.SQLException
Evaluates the expression as a long.

Overrides:
evalLong in class Expr
Parameters:
rows - the current tuple being evaluated
Returns:
the long value
Throws:
java.sql.SQLException

evalString

public java.lang.String evalString(QueryContext context)
                            throws java.sql.SQLException
Evaluates the expression as a string.

Overrides:
evalString in class Expr
Parameters:
rows - the current tuple being evaluated
Returns:
the string value
Throws:
java.sql.SQLException