Package org.h2.expression
Class Format
java.lang.Object
org.h2.expression.Expression
org.h2.expression.Operation1
org.h2.expression.Format
A format clause such as FORMAT JSON.
-
Nested Class Summary
Nested Classes -
Field Summary
Fields inherited from class org.h2.expression.Operation1
arg, typeFields inherited from class org.h2.expression.Expression
AUTO_PARENTHESES, MAP_IN_AGGREGATE, MAP_IN_WINDOW, MAP_INITIAL, WITH_PARENTHESES, WITHOUT_PARENTHESESFields inherited from interface org.h2.util.HasSQL
ADD_PLAN_INFORMATION, DEFAULT_SQL_FLAGS, NO_CASTS, QUOTE_ONLY_WHEN_REQUIRED, REPLACE_LOBS_FOR_TRACE, TRACE_SQL_FLAGS -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ValueApplies the JSON format to the specified value.getColumnName(SessionLocal session, int columnIndex) Get the column name or alias name of this expression.intCheck whether this expression is a column and can store NULL.Get the table name, or nullgetUnenclosedSQL(StringBuilder builder, int sqlFlags) Get the SQL statement of this expression.getValue(SessionLocal session) Return the resulting value for the current row.Returns the value with applied format.booleanCheck if this is an identity column.optimize(SessionLocal session) Try to optimize the expression.Methods inherited from class org.h2.expression.Operation1
getCost, getSubexpression, getSubexpressionCount, getType, isEverything, mapColumns, setEvaluatable, updateAggregateMethods inherited from class org.h2.expression.Expression
addFilterConditions, createIndexConditions, getAlias, getBooleanValue, getColumnNameForView, getEnclosedSQL, getNonAliasExpression, getNotIfPossible, getSchemaName, getSQL, getSQL, getSQL, getSQL, getTableAlias, getTypeIfStaticallyKnown, getWhenSQL, getWhenValue, isConstant, isNullConstant, isValueSet, isWhenConditionOperand, needParentheses, optimizeCondition, toString, writeExpressions, writeExpressionsMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.h2.util.HasSQL
getTraceSQL
-
Constructor Details
-
Format
-
-
Method Details
-
getValue
Description copied from class:ExpressionReturn the resulting value for the current row.- Specified by:
getValuein classExpression- Parameters:
session- the session- Returns:
- the result
-
getValue
Returns the value with applied format.- Parameters:
value- the value- Returns:
- the value with applied format
-
applyJSON
Applies the JSON format to the specified value.- Parameters:
value- the value- Returns:
- the value with applied format
-
optimize
Description copied from class:ExpressionTry to optimize the expression.- Specified by:
optimizein classExpression- Parameters:
session- the session- Returns:
- the optimized expression
-
isIdentity
public boolean isIdentity()Description copied from class:ExpressionCheck if this is an identity column.- Overrides:
isIdentityin classExpression- Returns:
- true if it is an identity column
-
getUnenclosedSQL
Description copied from class:ExpressionGet the SQL statement of this expression. This may not always be the original SQL statement, especially after optimization. Enclosing '(' and ')' are never appended.- Specified by:
getUnenclosedSQLin classExpression- Parameters:
builder- string buildersqlFlags- formatting flags- Returns:
- the specified string builder
-
getNullable
public int getNullable()Description copied from class:ExpressionCheck whether this expression is a column and can store NULL.- Overrides:
getNullablein classExpression- Returns:
- whether NULL is allowed
-
getTableName
Description copied from class:ExpressionGet the table name, or null- Overrides:
getTableNamein classExpression- Returns:
- the table name
-
getColumnName
Description copied from class:ExpressionGet the column name or alias name of this expression.- Overrides:
getColumnNamein classExpression- Parameters:
session- the sessioncolumnIndex- 0-based column index- Returns:
- the column name
-