Class AbstractSqlLikeQueryBuilder2.QueryState
java.lang.Object
io.micronaut.data.model.query.builder.sql.AbstractSqlLikeQueryBuilder2.QueryState
- Enclosing class:
- AbstractSqlLikeQueryBuilder2
The state of the query.
-
Constructor Summary
ConstructorDescriptionQueryState
(QueryBuilder2.BaseQueryDefinition query, boolean allowJoins, boolean useAlias) -
Method Summary
Modifier and TypeMethodDescriptionvoid
Applies a join for the given association.@Nullable String
findJoinAlias
(String path) void
Generates the JOIN query.@NonNull String
getJoinAlias
(String path) The parameter binding.getQuery()
@Nullable String
boolean
boolean
Checks if the path is joined already.default void
pushAdditionalParameter
(@NonNull String name) void
pushParameter
(@NonNull BindingParameter bindingParameter, BindingParameter.BindingContext bindingContext) void
pushParameter
(@NonNull QueryParameterBinding parameterBinding) Adds query parameter binding.void
setJoinPaths
(List<JoinPath> joinPaths) boolean
-
Constructor Details
-
QueryState
-
-
Method Details
-
getRootAlias
- Returns:
- The root alias
-
getEntity
- Returns:
- The entity
-
getFinalQuery
-
getQueryParts
-
getQuery
- Returns:
- The query string
-
isAllowJoins
public boolean isAllowJoins()- Returns:
- Does the query allow joins
-
baseQueryDefinition
- Returns:
- The query model object
-
findJoinAlias
-
getJoinAlias
-
applyJoin
Applies a join for the given association.- Parameters:
joinPath
- The join path
-
generateJoinQuery
public void generateJoinQuery()Generates the JOIN query. -
isJoined
Checks if the path is joined already.- Parameters:
associationPath
- The association path.- Returns:
- true if joined
-
shouldEscape
public boolean shouldEscape()- Returns:
- Should escape the query
-
getParameterBindings
The parameter binding.- Returns:
- The parameter binding
-
pushParameter
public void pushParameter(@NonNull @NonNull BindingParameter bindingParameter, @NonNull BindingParameter.BindingContext bindingContext) -
pushParameter
Adds query parameter binding.- Parameters:
parameterBinding
- the query parameter binding
-
getJoinPaths
-
setJoinPaths
-
pushAdditionalParameter
-