NullableColumnWithTransform
A class that handles the transformation between a source column type and a target type, but also supports transformations involving null
values.
NullableColumnWithTransform extends ColumnType and can be used to define columns that can transform null
to non-null
values and vice versa.
Parameters
The type to which the column value of type Unwrapped is transformed
The type of the column
The original column's IColumnType
Instance of ColumnTransformer that makes actual data transformation
Constructors
Properties
Functions
Returns the SQL representation of the specified non-null value, for this column type.
Returns an object compatible with the database, from the specified non-null value, for this column type.
Defines the appearance of parameter markers in prepared SQL statements.
Recursively unwraps the given value by applying the delegate's transformation.
Function checks that provided value is suites the column type and throws IllegalArgumentException otherwise. value can be of any type (including Expression)
Converts the specified value (from the database) to an object of the appropriated type, for this column type. Default implementation returns the same instance.
Returns the SQL representation of the specified value, for this column type. If the value is null
and the column is not nullable, an exception will be thrown. Used when generating an SQL statement and when logging that statement.