public class Parameter extends Expression implements ParameterInterface
MAP_IN_AGGREGATE, MAP_IN_WINDOW, MAP_INITIAL| Constructor and Description |
|---|
Parameter(int index) |
| Modifier and Type | Method and Description |
|---|---|
void |
checkSet()
Check if the value is set.
|
int |
getCost()
Estimate the cost to process the expression.
|
int |
getIndex() |
Expression |
getNotIfPossible(Session session)
If it is possible, return the negated expression.
|
Value |
getParamValue()
Get the value of the parameter if set.
|
long |
getPrecision()
Get the expected precision of this parameter.
|
int |
getScale()
Get the expected scale of this parameter.
|
java.lang.StringBuilder |
getSQL(java.lang.StringBuilder builder)
Appends the SQL statement of this expression to the specified builder.
|
TypeInfo |
getType()
Returns the data type.
|
Value |
getValue(Session session)
Return the resulting value for the current row.
|
int |
getValueType()
Get the expected data type of the parameter if no value is set, or the
data type of the value if one is set.
|
boolean |
isConstant()
Check if this expression will always return the same value.
|
boolean |
isEverything(ExpressionVisitor visitor)
Check if this expression and all sub-expressions can fulfill a criteria.
|
boolean |
isValueSet()
Is the value of a parameter set.
|
void |
mapColumns(ColumnResolver resolver,
int level,
int state)
Map the columns of the resolver to expression columns.
|
Expression |
optimize(Session session)
Try to optimize the expression.
|
void |
setColumn(Column column) |
void |
setEvaluatable(TableFilter tableFilter,
boolean b)
Tell the expression columns whether the table filter can return values
now.
|
void |
setValue(Value v) |
void |
setValue(Value v,
boolean closeOld)
Set the value of the parameter.
|
void |
updateAggregate(Session session,
int stage)
Update an aggregate value.
|
addFilterConditions, createIndexConditions, getAlias, getBooleanValue, getColumnName, getExpressionColumns, getExpressionColumns, getExpressionColumns, getNonAliasExpression, getNullable, getSchemaName, getSQL, getSubexpression, getSubexpressionCount, getTableAlias, getTableName, getUnenclosedSQL, isAutoIncrement, isGeneratedKey, toString, writeExpressions, writeExpressionsclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetNullablepublic java.lang.StringBuilder getSQL(java.lang.StringBuilder builder)
ExpressiongetSQL in class Expressionbuilder - string builderpublic void setValue(Value v, boolean closeOld)
ParameterInterfacesetValue in interface ParameterInterfacev - the new valuecloseOld - if the old value (if one is set) should be closedpublic void setValue(Value v)
public Value getParamValue()
ParameterInterfacegetParamValue in interface ParameterInterfacepublic Value getValue(Session session)
ExpressiongetValue in class Expressionsession - the sessionpublic TypeInfo getType()
ExpressiongetType in class Expressionpublic int getValueType()
ParameterInterfacegetValueType in interface ParameterInterfacepublic void mapColumns(ColumnResolver resolver, int level, int state)
ExpressionmapColumns in class Expressionresolver - the column resolverlevel - the subquery nesting levelstate - current state for nesting checks, initial value is
Expression.MAP_INITIALpublic void checkSet()
ParameterInterfacecheckSet in interface ParameterInterfacepublic Expression optimize(Session session)
Expressionoptimize in class Expressionsession - the sessionpublic boolean isConstant()
ExpressionisConstant in class Expressionpublic boolean isValueSet()
ExpressionisValueSet in interface ParameterInterfaceisValueSet in class Expressionpublic void setEvaluatable(TableFilter tableFilter, boolean b)
ExpressionsetEvaluatable in class ExpressiontableFilter - the table filterb - true if the table filter can return valuepublic int getScale()
ParameterInterfacegetScale in interface ParameterInterfacepublic long getPrecision()
ParameterInterfacegetPrecision in interface ParameterInterfacepublic void updateAggregate(Session session, int stage)
ExpressionupdateAggregate in class Expressionsession - the sessionstage - select stagepublic boolean isEverything(ExpressionVisitor visitor)
ExpressionisEverything in class Expressionvisitor - the visitorpublic int getCost()
ExpressiongetCost in class Expressionpublic Expression getNotIfPossible(Session session)
ExpressiongetNotIfPossible in class Expressionsession - the sessionpublic void setColumn(Column column)
public int getIndex()