com.caucho.db.sql
Class ExistsExpr

java.lang.Object
  extended by com.caucho.db.sql.Expr
      extended by com.caucho.db.sql.SubSelectExpr
          extended by com.caucho.db.sql.ExistsExpr

public class ExistsExpr
extends SubSelectExpr


Field Summary
protected static L10N L
           
 
Fields inherited from class com.caucho.db.sql.Expr
FALSE, TRUE, UNKNOWN
 
Method Summary
 Expr bind(Query query)
          Binds the expression to the query.
 int evalBoolean(QueryContext context)
          Evaluates the expression as a string.
 java.lang.Class getType()
          Returns the expected result type of the expression.
 boolean isNull(QueryContext context)
          Evaluates the expression to check for null
 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.SubSelectExpr
evalString, getSubSelect
 
Methods inherited from class com.caucho.db.sql.Expr
cost, createOrder, evalBytes, evalDate, evalDouble, evalEqual, evalEqual, evalGroup, evalLong, 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
Method Detail

bind

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

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

getType

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

Overrides:
getType in class SubSelectExpr

subCost

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

Overrides:
subCost in class SubSelectExpr

isNull

public boolean isNull(QueryContext context)
               throws java.sql.SQLException
Evaluates the expression to check for null

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

evalBoolean

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

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

toString

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