|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.caucho.db.sql.Expr
public abstract class Expr
| Field Summary | |
|---|---|
static int |
FALSE
|
protected static L10N |
L
|
static int |
TRUE
|
static int |
UNKNOWN
|
| Constructor Summary | |
|---|---|
Expr()
|
|
| Method Summary | |
|---|---|
protected Expr |
bind(Query query)
|
long |
cost(java.util.ArrayList<com.caucho.db.sql.FromItem> fromList)
Returns the cost based on the given FromList. |
com.caucho.db.sql.Order |
createOrder(int index)
Returns the order. |
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. |
void |
evalGroup(QueryContext context)
Evaluates aggregate functions during the group phase. |
long |
evalLong(QueryContext context)
Evaluates the expression as a long. |
java.io.InputStream |
evalStream(QueryContext context)
Evaluates the expression as a string. |
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 |
protected int |
evalToBuffer(QueryContext context,
byte[] buffer,
int off,
int columnType)
Evaluates the expression to a buffer |
void |
evalToResult(QueryContext context,
SelectResult result)
Evaluates the expression, writing to the result stream. |
com.caucho.db.sql.RowIterateExpr |
getIndexExpr(com.caucho.db.sql.FromItem fromItem)
Returns an index expression if available. |
java.lang.String |
getName()
Returns any column name. |
int |
getSQLType()
Returns the column type. |
Table |
getTable()
Returns the table. |
java.lang.Class |
getType()
Returns the expected result type of the expression. |
void |
initGroup(QueryContext context)
Initializes aggregate functions during the group phase. |
boolean |
isBinaryStream()
Returns true if the expression returns a binary stream. |
boolean |
isBoolean()
Returns true if the expression returns a boolean. |
boolean |
isDouble()
Returns true if the expression returns a double. |
boolean |
isLong()
Returns true if the expression returns a long. |
boolean |
isNull(QueryContext context)
Returns true if result is null |
boolean |
isSelect(QueryContext context)
Returns true if the expression selects the row. |
void |
splitAnd(java.util.ArrayList<Expr> andProduct)
Splits the expr into and blocks. |
long |
subCost(java.util.ArrayList<com.caucho.db.sql.FromItem> fromList)
Returns the cost based on the given FromList. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static final L10N L
public static final int UNKNOWN
public static final int FALSE
public static final int TRUE
| Constructor Detail |
|---|
public Expr()
| Method Detail |
|---|
protected Expr bind(Query query)
throws java.sql.SQLException
java.sql.SQLExceptionpublic java.lang.Class getType()
public boolean isLong()
public boolean isDouble()
public boolean isBoolean()
public boolean isBinaryStream()
public java.lang.String getName()
public int getSQLType()
public Table getTable()
public void splitAnd(java.util.ArrayList<Expr> andProduct)
public long cost(java.util.ArrayList<com.caucho.db.sql.FromItem> fromList)
public long subCost(java.util.ArrayList<com.caucho.db.sql.FromItem> fromList)
public com.caucho.db.sql.RowIterateExpr getIndexExpr(com.caucho.db.sql.FromItem fromItem)
public com.caucho.db.sql.Order createOrder(int index)
public boolean isNull(QueryContext context)
throws java.sql.SQLException
rows - the current database tuple
java.sql.SQLException
public boolean isSelect(QueryContext context)
throws java.sql.SQLException
rows - the current database tuple
java.sql.SQLException
public int evalBoolean(QueryContext context)
throws java.sql.SQLException
rows - the current database tuple
java.sql.SQLException
public java.lang.String evalString(QueryContext context)
throws java.sql.SQLException
rows - the current database tuple
java.sql.SQLException
public long evalLong(QueryContext context)
throws java.sql.SQLException
rows - the current database tuple
java.sql.SQLException
public double evalDouble(QueryContext context)
throws java.sql.SQLException
rows - the current database tuple
java.sql.SQLException
public long evalDate(QueryContext context)
throws java.sql.SQLException
rows - the current database tuple
java.sql.SQLException
public void evalToResult(QueryContext context,
SelectResult result)
throws java.sql.SQLException
result - the output result
java.sql.SQLException
public java.io.InputStream evalStream(QueryContext context)
throws java.sql.SQLException
rows - the current database tuple
java.sql.SQLException
public int evalToBuffer(QueryContext context,
byte[] buffer,
int offset)
throws java.sql.SQLException
result - the result buffer
java.sql.SQLException
protected int evalToBuffer(QueryContext context,
byte[] buffer,
int off,
int columnType)
throws java.sql.SQLException
result - the result buffer
java.sql.SQLException
public void initGroup(QueryContext context)
throws java.sql.SQLException
context - the current database tuple
java.sql.SQLException
public void evalGroup(QueryContext context)
throws java.sql.SQLException
context - the current database tuple
java.sql.SQLException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||