java.lang.Object
org.litebridgedb.db.spi.expression.ConvertExpression
- All Implemented Interfaces:
DelegateExpression,SelectExpression
Represents a conversion expression that wraps another
SelectExpression,
potentially overriding its type.
This class serves as a decorator around a target SelectExpression, allowing
for an optional type override. It delegates SQL generation to the encapsulated target
expression.
-
Constructor Summary
ConstructorsConstructorDescriptionConvertExpression(SelectExpression target, Class<?> typeOverride) Constructor. -
Method Summary
-
Constructor Details
-
ConvertExpression
Constructor.- Parameters:
target- The encapsulated target column expression for this expression.
-
-
Method Details
-
toSql
Description copied from interface:SelectExpressionCreates a SQL representation of the expression.- Specified by:
toSqlin interfaceSelectExpression- Parameters:
operation- the operation that is being executed- Returns:
- the SQL representation of the expression
-
target
Description copied from interface:DelegateExpressionRetrieves the target expression of this delegate.- Specified by:
targetin interfaceDelegateExpression- Returns:
- The target expression.
-
typeOverride
Retrieves the class type that overrides the default type of the wrappedSelectExpression.- Returns:
- The type override, or
nullif no override is specified.
-