org.h2.expression

## Class TypedValueExpression

- java.lang.Object
- - org.h2.expression.Expression
  - - org.h2.expression.ValueExpression
    - - org.h2.expression.TypedValueExpression

    public class TypedValueExpression
    extends ValueExpression

An expression representing a constant value with a type cast.

### Field Summary

### Fields inherited from class org.h2.expression.Expression

`MAP_IN_AGGREGATE, MAP_IN_WINDOW, MAP_INITIAL`

### Method Summary

Methods
`static TypedValueExpression` `get(Value value, TypeInfo type)` Create a new expression with the given value and type.
`java.lang.StringBuilder` `getSQL(java.lang.StringBuilder builder, boolean alwaysQuote)` Appends the SQL statement of this expression to the specified builder.
`TypeInfo` `getType()` Returns the data type.
`static TypedValueExpression` `getUnknown()` Get the UNKNOWN expression.
`boolean` `isNullConstant()` Check if this expression will always return the NULL value.

### Methods inherited from class org.h2.expression.ValueExpression

`createIndexConditions, get, getBoolean, getBoolean, getCost, getDefault, getExpressionColumns, getNotIfPossible, getNull, getValue, isConstant, isEverything, isValueSet, mapColumns, optimize, setEvaluatable, updateAggregate`

### Methods inherited from class org.h2.expression.Expression

`addFilterConditions, getAlias, getBooleanValue, getColumnName, getExpressionColumns, getExpressionColumns, getNonAliasExpression, getNullable, getSchemaName, getSQL, getSubexpression, getSubexpressionCount, getTableAlias, getTableName, getUnenclosedSQL, isAutoIncrement, toString, writeExpressions, writeExpressions`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

### Method Detail

#### get

    public static TypedValueExpression get(Value value,
                           TypeInfo type)

Create a new expression with the given value and type.

Parameters:
  `value` - the value
  `type` - the value type
Returns:
  the expression

#### getUnknown

    public static TypedValueExpression getUnknown()

Get the UNKNOWN expression.

Returns:
  the UNKNOWN expression

#### getType

    public TypeInfo getType()

Description copied from class: `Expression`
Returns the data type. The data type may not be known before the optimization phase.

Overrides:
  `getType` in class `ValueExpression`
Returns:
  the data type

#### getSQL

    public java.lang.StringBuilder getSQL(java.lang.StringBuilder builder,
                                 boolean alwaysQuote)

Description copied from class: `Expression`
Appends the SQL statement of this expression to the specified builder. This may not always be the original SQL statement, specially after optimization.

Overrides:
  `getSQL` in class `ValueExpression`
Parameters:
  `builder` - string builder
  `alwaysQuote` - quote all identifiers
Returns:
  the specified string builder

#### isNullConstant

    public boolean isNullConstant()

Description copied from class: `Expression`
Check if this expression will always return the NULL value.

Overrides:
  `isNullConstant` in class `ValueExpression`
Returns:
  if the expression is constant NULL value