|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.h2.expression.Expression
public abstract class Expression
An expression is a operation, a value, or a function in a query.
Constructor Summary | |
---|---|
Expression()
|
Method Summary | |
---|---|
void |
addFilterConditions(TableFilter filter,
boolean outerJoin)
Add conditions to a table filter if they can be evaluated. |
void |
createIndexConditions(Session session,
TableFilter filter)
Create index conditions if possible and attach them to the table filter. |
java.lang.String |
getAlias()
Get the alias name of a column or SQL expression if it is not an aliased expression. |
java.lang.Boolean |
getBooleanValue(Session session)
Get the value in form of a boolean expression. |
java.lang.String |
getColumnName()
Get the column name or alias name of this expression. |
abstract int |
getCost()
Estimate the cost to process the expression. |
abstract int |
getDisplaySize()
Get the display size of this expression. |
Expression |
getNonAliasExpression()
Returns the main expression, skipping aliases. |
Expression |
getNotIfPossible(Session session)
If it is possible, return the negated expression. |
int |
getNullable()
Check whether this expression is a column and can store null values. |
abstract long |
getPrecision()
Get the precision of this expression. |
abstract int |
getScale()
Get the scale of this expression. |
java.lang.String |
getSchemaName()
Get the schema name, or null |
abstract java.lang.String |
getSQL()
Get the SQL statement of this expression. |
java.lang.String |
getTableAlias()
Get the table alias name or null if this expression does not represent a column. |
java.lang.String |
getTableName()
Get the table name, or null |
abstract int |
getType()
Return the data type. |
abstract Value |
getValue(Session session)
Return the resulting value for the current row. |
boolean |
isAutoIncrement()
Check if this is an auto-increment column. |
boolean |
isConstant()
Check if this expression will always return the same value. |
abstract boolean |
isEverything(ExpressionVisitor visitor)
Check if this expression and all sub-expressions can fulfill a criteria. |
boolean |
isEverything(int expressionVisitorType)
Check if this expression and all sub-expressions can fulfill a criteria. |
boolean |
isValueSet()
Is the value of a parameter set. |
boolean |
isWildcard()
Only returns true if the expression is a wildcard. |
abstract void |
mapColumns(ColumnResolver resolver,
int level)
Map the columns of the resolver to expression columns. |
abstract Expression |
optimize(Session session)
Try to optimize the expression. |
Expression |
optimizeInJoin(Session session,
Select select)
Optimize IN(...) expressions if possible. |
abstract void |
setEvaluatable(TableFilter tableFilter,
boolean value)
Tell the expression columns whether the table filter can return values now. |
java.lang.String |
toString()
Convert this expression to a String. |
abstract void |
updateAggregate(Session session)
Update an aggregate value. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Expression()
Method Detail |
---|
public abstract Value getValue(Session session) throws java.sql.SQLException
session
- the session
java.sql.SQLException
public abstract int getType()
public abstract void mapColumns(ColumnResolver resolver, int level) throws java.sql.SQLException
resolver
- the column resolverlevel
- the subquery nesting level
java.sql.SQLException
public abstract Expression optimize(Session session) throws java.sql.SQLException
session
- the session
java.sql.SQLException
public abstract void setEvaluatable(TableFilter tableFilter, boolean value)
tableFilter
- the table filtervalue
- true if the table filter can return valuepublic abstract int getScale()
public abstract long getPrecision()
public abstract int getDisplaySize()
public abstract java.lang.String getSQL()
public abstract void updateAggregate(Session session) throws java.sql.SQLException
session
- the session
java.sql.SQLException
public abstract boolean isEverything(ExpressionVisitor visitor)
visitor
- the visitor
public abstract int getCost()
public final boolean isEverything(int expressionVisitorType)
expressionVisitorType
- the visitor type
public Expression getNotIfPossible(Session session)
session
- the session
public boolean isConstant()
public boolean isValueSet()
public boolean isAutoIncrement()
public java.lang.Boolean getBooleanValue(Session session) throws java.sql.SQLException
session
- the session
java.sql.SQLException
public void createIndexConditions(Session session, TableFilter filter) throws java.sql.SQLException
session
- the sessionfilter
- the table filter
java.sql.SQLException
public java.lang.String getColumnName()
public java.lang.String getSchemaName()
public java.lang.String getTableName()
public int getNullable()
public java.lang.String getTableAlias()
public java.lang.String getAlias()
public boolean isWildcard()
public Expression getNonAliasExpression()
public void addFilterConditions(TableFilter filter, boolean outerJoin)
filter
- the table filterouterJoin
- if the expression is part of an outer joinpublic java.lang.String toString()
toString
in class java.lang.Object
public Expression optimizeInJoin(Session session, Select select) throws java.sql.SQLException
session
- the sessionselect
- the query
java.sql.SQLException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |