java.lang.Object
org.litebridge.orm.api.select.model.SelectExpressionMapper
Maps high-level
ExpressionSpec query expressions to dialect-specific SelectExpression instances.-
Constructor Summary
ConstructorsConstructorDescriptionSelectExpressionMapper(SqlFunctionRegistry sqlFunctionRegistry, ProtoExpressionResolver protoExpressionResolver) Creates a newSelectExpressionMapperinstance. -
Method Summary
Modifier and TypeMethodDescriptionresolveProtoExpression(ExpressionSpec expressionSpec, @Nullable OrmTable ormTable, Table table, @Nullable String tableAlias, ClauseType clause) Resolves a proto-expression into one or more concrete expression specifications.toSelectExpression(ExpressionSpec expressionSpec, Map<String, SelectExpression> selectExpressionAliasMap) Converts anExpressionSpecinto a dialect-specificSelectExpression.
-
Constructor Details
-
SelectExpressionMapper
public SelectExpressionMapper(SqlFunctionRegistry sqlFunctionRegistry, ProtoExpressionResolver protoExpressionResolver) Creates a newSelectExpressionMapperinstance.- Parameters:
sqlFunctionRegistry- the SQL function registryprotoExpressionResolver- the proto expression resolver
-
-
Method Details
-
resolveProtoExpression
public List<ExpressionSpec> resolveProtoExpression(ExpressionSpec expressionSpec, @Nullable OrmTable ormTable, Table table, @Nullable String tableAlias, ClauseType clause) Resolves a proto-expression into one or more concrete expression specifications.- Parameters:
expressionSpec- the expression specification to resolveormTable- the ORM table metadata, ornulltable- the SQL tableclause- the clause type where the expression is used- Returns:
- the list of resolved expression specifications
-
toSelectExpression
public SelectExpression toSelectExpression(ExpressionSpec expressionSpec, Map<String, SelectExpression> selectExpressionAliasMap) Converts anExpressionSpecinto a dialect-specificSelectExpression.- Parameters:
expressionSpec- the expression specification to convert- Returns:
- the converted
SelectExpression
-