com.caucho.db.fun
Class BitandExpr

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

public class BitandExpr
extends FunExpr


Field Summary
protected static L10N L
           
 
Fields inherited from class com.caucho.db.sql.Expr
FALSE, TRUE, UNKNOWN
 
Constructor Summary
BitandExpr()
           
BitandExpr(Expr left, Expr right)
           
 
Method Summary
protected  void addArg(Expr expr)
           
 Expr bind(Query query)
          Binds the expression to the actual tables.
 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.
 long subCost(java.util.ArrayList<FromItem> fromList)
          Returns the cost based on the given FromList.
 java.lang.String toString()
           
 
Methods inherited from class com.caucho.db.sql.Expr
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, updateDouble, updateLong, updateString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

L

protected static final L10N L
Constructor Detail

BitandExpr

public BitandExpr()

BitandExpr

public BitandExpr(Expr left,
                  Expr right)
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

bind

public Expr bind(Query query)
          throws java.sql.SQLException
Binds the expression to the actual tables.

Overrides:
bind in class Expr
Throws:
java.sql.SQLException

subCost

public long subCost(java.util.ArrayList<FromItem> fromList)
Returns the cost based on the given FromList.

Overrides:
subCost 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

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object