public class ConditionAndOr extends Expression
| 限定符和类型 | 字段和说明 |
|---|---|
static int |
AND
The AND condition type as in ID=1 AND NAME='Hello'.
|
static int |
OR
The OR condition type as in ID=1 OR NAME='Hello'.
|
AUTO_PARENTHESES, MAP_IN_AGGREGATE, MAP_IN_WINDOW, MAP_INITIAL, WITH_PARENTHESES, WITHOUT_PARENTHESESADD_PLAN_INFORMATION, DEFAULT_SQL_FLAGS, NO_CASTS, QUOTE_ONLY_WHEN_REQUIRED, REPLACE_LOBS_FOR_TRACE, TRACE_SQL_FLAGS| 构造器和说明 |
|---|
ConditionAndOr(int andOrType,
Expression left,
Expression right) |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
addFilterConditions(TableFilter filter)
Add conditions to a table filter if they can be evaluated.
|
void |
createIndexConditions(SessionLocal session,
TableFilter filter)
Create index conditions if possible and attach them to the table filter.
|
int |
getCost()
Estimate the cost to process the expression.
|
Expression |
getNotIfPossible(SessionLocal session)
If it is possible, return the negated expression.
|
Expression |
getSubexpression(int index)
Returns subexpression with specified index.
|
int |
getSubexpressionCount()
Returns count of subexpressions.
|
TypeInfo |
getType()
Returns the data type.
|
StringBuilder |
getUnenclosedSQL(StringBuilder builder,
int sqlFlags)
Get the SQL statement of this expression.
|
Value |
getValue(SessionLocal session)
Return the resulting value for the current row.
|
boolean |
isEverything(ExpressionVisitor visitor)
Check if this expression and all sub-expressions can fulfill a criteria.
|
void |
mapColumns(ColumnResolver resolver,
int level,
int state)
Map the columns of the resolver to expression columns.
|
boolean |
needParentheses()
Returns whether this expressions needs to be wrapped in parentheses when
it is used as an argument of other expressions.
|
Expression |
optimize(SessionLocal session)
Try to optimize the expression.
|
void |
setEvaluatable(TableFilter tableFilter,
boolean b)
Tell the expression columns whether the table filter can return values
now.
|
void |
updateAggregate(SessionLocal session,
int stage)
Update an aggregate value.
|
getAlias, getBooleanValue, getColumnName, getColumnNameForView, getEnclosedSQL, getNonAliasExpression, getNullable, getSchemaName, getSQL, getSQL, getSQL, getSQL, getTableAlias, getTableName, getWhenSQL, getWhenValue, isConstant, isIdentity, isNullConstant, isValueSet, isWhenConditionOperand, optimizeCondition, toString, writeExpressions, writeExpressionsclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetTraceSQLpublic static final int AND
public static final int OR
public ConditionAndOr(int andOrType,
Expression left,
Expression right)
public boolean needParentheses()
ExpressionneedParentheses 在类中 Expressiontrue if it ispublic StringBuilder getUnenclosedSQL(StringBuilder builder, int sqlFlags)
ExpressiongetUnenclosedSQL 在类中 Expressionbuilder - string buildersqlFlags - formatting flagspublic void createIndexConditions(SessionLocal session, TableFilter filter)
ExpressioncreateIndexConditions 在类中 Expressionsession - the sessionfilter - the table filterpublic Expression getNotIfPossible(SessionLocal session)
ExpressiongetNotIfPossible 在类中 Expressionsession - the sessionpublic Value getValue(SessionLocal session)
ExpressiongetValue 在类中 Expressionsession - the sessionpublic Expression optimize(SessionLocal session)
Expressionoptimize 在类中 Expressionsession - the sessionpublic void addFilterConditions(TableFilter filter)
ExpressionaddFilterConditions 在类中 Expressionfilter - the table filterpublic void mapColumns(ColumnResolver resolver, int level, int state)
ExpressionmapColumns 在类中 Expressionresolver - the column resolverlevel - the subquery nesting levelstate - current state for nesting checks, initial value is
Expression.MAP_INITIALpublic void setEvaluatable(TableFilter tableFilter, boolean b)
ExpressionsetEvaluatable 在类中 ExpressiontableFilter - the table filterb - true if the table filter can return valuepublic void updateAggregate(SessionLocal session, int stage)
ExpressionupdateAggregate 在类中 Expressionsession - the sessionstage - select stagepublic boolean isEverything(ExpressionVisitor visitor)
ExpressionisEverything 在类中 Expressionvisitor - the visitorpublic int getCost()
ExpressiongetCost 在类中 Expressionpublic int getSubexpressionCount()
ExpressiongetSubexpressionCount 在类中 Expressionpublic Expression getSubexpression(int index)
ExpressiongetSubexpression 在类中 Expressionindex - 0-based indexpublic TypeInfo getType()
ExpressiongetType 在接口中 TypedgetType 在类中 ExpressionCopyright © 2022. All rights reserved.