com.caucho.db.sql
Class MinExpr

java.lang.Object
  extended by com.caucho.db.sql.Expr
      extended by com.caucho.db.sql.FunExpr
          extended by com.caucho.db.sql.MinExpr
All Implemented Interfaces:
GroupExpr

public class MinExpr
extends FunExpr
implements GroupExpr


Field Summary
 
Fields inherited from class com.caucho.db.sql.Expr
FALSE, TRUE, UNKNOWN
 
Constructor Summary
MinExpr()
           
 
Method Summary
protected  void addArg(Expr expr)
           
 Expr bind(Query query)
           
 double evalDouble(QueryContext context)
          Evaluates the expression as a double.
 void evalGroup(QueryContext context)
          Evaluates aggregate functions during the group phase.
 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.
 void initGroup(QueryContext context)
          Initializes aggregate functions during the group phase.
 boolean isNull(QueryContext context)
          Returns true if the value is null.
 
Methods inherited from class com.caucho.db.sql.Expr
cost, createOrder, evalBoolean, evalBytes, evalDate, evalEqual, evalEqual, evalStream, evalToBuffer, evalToBuffer, evalToResult, getIndexExpr, getName, getSQLType, getTable, getTypeCode, indexCost, indexSubCost, 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
 

Constructor Detail

MinExpr

public MinExpr()
Method Detail

addArg

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

bind

public Expr bind(Query query)
          throws java.sql.SQLException
Overrides:
bind in class Expr
Throws:
java.sql.SQLException

getType

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

Overrides:
getType in class Expr

initGroup

public void initGroup(QueryContext context)
               throws java.sql.SQLException
Initializes aggregate functions during the group phase.

Overrides:
initGroup in class Expr
Parameters:
context - the current database tuple
Throws:
java.sql.SQLException

evalGroup

public void evalGroup(QueryContext context)
               throws java.sql.SQLException
Evaluates aggregate functions during the group phase.

Overrides:
evalGroup in class Expr
Parameters:
context - the current database tuple
Throws:
java.sql.SQLException

isNull

public boolean isNull(QueryContext context)
               throws java.sql.SQLException
Returns true if the value is null.

Overrides:
isNull in class Expr
Parameters:
queryContext - the query context
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