Top Description Inners Fields Constructors Methods
org.h2.expression

public final Class Format

extends Operation1
Class Inheritance
Imports
org.h2.engine.SessionLocal, org.h2.value.TypeInfo, .Value, .ValueJson, .ValueNull

A format clause such as FORMAT JSON.

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static enum
Format.FormatEnum

Supported formats.

Field Summary

Modifier and TypeField and Description
private final Format.FormatEnum
Inherited from org.h2.expression.Operation1:
argtype

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public static Value

Returns:

the value with applied format
applyJSON
(Value
the value
value
)

Applies the JSON format to the specified value.

public String
getColumnName(SessionLocal
the session
session
,
int
0-based column index
columnIndex
)

Overrides org.h2.expression.Expression.getColumnName.

Get the column name or alias name of this expression.

public int
getNullable()

Overrides org.h2.expression.Expression.getNullable.

Check whether this expression is a column and can store NULL.

public String
getTableName()

Overrides org.h2.expression.Expression.getTableName.

Get the table name, or null

public StringBuilder
getUnenclosedSQL(StringBuilder
string builder
builder
,
int
formatting flags
sqlFlags
)

Implements abstract org.h2.expression.Expression.getUnenclosedSQL.

Get the SQL statement of this expression.

public Value
getValue(SessionLocal
the session
session
)

Implements abstract org.h2.expression.Expression.getValue.

Return the resulting value for the current row.

public Value

Returns:

the value with applied format
getValue
(Value
the value
value
)

Returns the value with applied format.

public boolean
isIdentity()

Overrides org.h2.expression.Expression.isIdentity.

Check if this is an identity column.

public Expression
optimize(SessionLocal
the session
session
)

Implements abstract org.h2.expression.Expression.optimize.

Try to optimize the expression.

Inherited from org.h2.expression.Operation1:
getCostgetSubexpressiongetSubexpressionCountgetTypeisEverythingmapColumnssetEvaluatableupdateAggregate

Field Detail

formatback to summary
private final Format.FormatEnum format

Constructor Detail

Formatback to summary
public Format(Expression arg, Format.FormatEnum format)

Method Detail

applyJSONback to summary
public static Value applyJSON(Value value)

Applies the JSON format to the specified value.

Parameters
value:Value

the value

Returns:Value

the value with applied format

getColumnNameback to summary
public String getColumnName(SessionLocal session, int columnIndex)

Overrides org.h2.expression.Expression.getColumnName.

Doc from org.h2.expression.Expression.getColumnName.

Get the column name or alias name of this expression.

Parameters
session:SessionLocal

the session

columnIndex:int

0-based column index

Returns:String

the column name

Annotations
@Override
getNullableback to summary
public int getNullable()

Overrides org.h2.expression.Expression.getNullable.

Doc from org.h2.expression.Expression.getNullable.

Check whether this expression is a column and can store NULL.

Returns:int

whether NULL is allowed

Annotations
@Override
getTableNameback to summary
public String getTableName()

Overrides org.h2.expression.Expression.getTableName.

Doc from org.h2.expression.Expression.getTableName.

Get the table name, or null

Returns:String

the table name

Annotations
@Override
getUnenclosedSQLback to summary
public StringBuilder getUnenclosedSQL(StringBuilder builder, int sqlFlags)

Implements abstract org.h2.expression.Expression.getUnenclosedSQL.

Doc from org.h2.expression.Expression.getUnenclosedSQL.

Get the SQL statement of this expression. This may not always be the original SQL statement, especially after optimization. Enclosing '(' and ')' are never appended.

Parameters
builder:StringBuilder

string builder

sqlFlags:int

formatting flags

Returns:StringBuilder

the specified string builder

Annotations
@Override
getValueback to summary
public Value getValue(SessionLocal session)

Implements abstract org.h2.expression.Expression.getValue.

Doc from org.h2.expression.Expression.getValue.

Return the resulting value for the current row.

Parameters
session:SessionLocal

the session

Returns:Value

the result

Annotations
@Override
getValueback to summary
public Value getValue(Value value)

Returns the value with applied format.

Parameters
value:Value

the value

Returns:Value

the value with applied format

isIdentityback to summary
public boolean isIdentity()

Overrides org.h2.expression.Expression.isIdentity.

Doc from org.h2.expression.Expression.isIdentity.

Check if this is an identity column.

Returns:boolean

true if it is an identity column

Annotations
@Override
optimizeback to summary
public Expression optimize(SessionLocal session)

Implements abstract org.h2.expression.Expression.optimize.

Doc from org.h2.expression.Expression.optimize.

Try to optimize the expression.

Parameters
session:SessionLocal

the session

Returns:Expression

the optimized expression

Annotations
@Override
org.h2.expression back to summary

public final Enum Format.FormatEnum

extends Enum<Format.FormatEnum>
Class Inheritance

Supported formats.

Field Summary

Modifier and TypeField and Description
public static final Format.FormatEnum
JSON

JSON.

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static Format.FormatEnum
public static Format.FormatEnum[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

JSONback to summary
public static final Format.FormatEnum JSON

JSON.

Constructor Detail

FormatEnumback to summary
private FormatEnum()

Method Detail

valueOfback to summary
public static Format.FormatEnum valueOf(String name)
valuesback to summary
public static Format.FormatEnum[] values()