com.caucho.db.sql
Class SubSelectParamExpr

java.lang.Object
  extended by com.caucho.db.sql.Expr
      extended by com.caucho.db.sql.SubSelectParamExpr

@Module
public class SubSelectParamExpr
extends Expr


Field Summary
 
Fields inherited from class com.caucho.db.sql.Expr
FALSE, L, TRUE, UNKNOWN
 
Method Summary
 Expr bind(Query parent)
          Binds the expression.
 void eval(QueryContext parent, QueryContext context)
          Sets the value.
 int evalBoolean(QueryContext context)
          Evaluates the expression as a boolean.
 long evalDate(QueryContext context)
          Evaluates the expression as a date
 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.
 int evalToBuffer(QueryContext context, byte[] buffer, int offset)
          Evaluates the expression to a buffer
 Expr getExpr()
          Returns the expr.
 java.lang.Class getType()
          Returns the type of the expression.
 boolean isNull(QueryContext context)
          Evaluates the expression as a string.
 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, evalBytes, evalEqual, evalEqual, evalGroup, evalStream, 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
 

Method Detail

getType

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

Overrides:
getType in class Expr

getExpr

public Expr getExpr()
Returns the expr.


subCost

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

Overrides:
subCost in class Expr

bind

public Expr bind(Query parent)
          throws java.sql.SQLException
Binds the expression.

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

eval

public void eval(QueryContext parent,
                 QueryContext context)
          throws java.sql.SQLException
Sets the value.

Throws:
java.sql.SQLException

isNull

public boolean isNull(QueryContext context)
               throws java.sql.SQLException
Evaluates the expression as a string.

Overrides:
isNull in class Expr
Parameters:
rows - the current database tuple
Returns:
the string 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 database tuple
Returns:
the string value
Throws:
java.sql.SQLException

evalBoolean

public int evalBoolean(QueryContext context)
                throws java.sql.SQLException
Evaluates the expression as a boolean.

Overrides:
evalBoolean in class Expr
Parameters:
rows - the current database tuple
Returns:
the boolean 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 database tuple
Returns:
the long value
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 database tuple
Returns:
the double value
Throws:
java.sql.SQLException

evalDate

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

Overrides:
evalDate in class Expr
Parameters:
rows - the current database tuple
Returns:
the date value
Throws:
java.sql.SQLException

evalToBuffer

public int evalToBuffer(QueryContext context,
                        byte[] buffer,
                        int offset)
                 throws java.sql.SQLException
Evaluates the expression to a buffer

Overrides:
evalToBuffer in class Expr
Parameters:
rows - the current database tuple
Returns:
the date value
Throws:
java.sql.SQLException

toString

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