Interface QueryResult
public interface QueryResult
Used to represent a built query that is computed at compilation time.
- Since:
- 1.0
- Author:
- graemerocher
-
Method Summary
Modifier and TypeMethodDescriptionReturns additional required parameters.default @Nullable String
Deprecated, for removal: This API element is subject to removal in a future version.Not useddefault @NonNull Collection<JoinPath>
Gets the join paths.default int
getMax()
default long
Returns the parameters binding for this query.A map containing the parameter names and the references to theArgument
names which define the values.@NonNull String
getQuery()
default @Nullable String
static @NonNull QueryResult
of
(@NonNull String query, @NonNull List<QueryParameterBinding> parameterBindings) Creates a new encoded query.static @NonNull QueryResult
of
(@NonNull String query, @NonNull List<String> queryParts, @NonNull List<QueryParameterBinding> parameterBindings) Creates a new encoded query.static @NonNull QueryResult
of
(@NonNull String query, @NonNull List<String> queryParts, @NonNull List<QueryParameterBinding> parameterBindings, int max, long offset, @Nullable Collection<JoinPath> joinPaths) Creates a new encoded query.static @NonNull QueryResult
of
(@NonNull String query, @NonNull List<String> queryParts, @NonNull List<QueryParameterBinding> parameterBindings, @NonNull Map<String, String> additionalRequiredParameters) Creates a new encoded query.static @NonNull QueryResult
of
(@NonNull String query, @NonNull List<String> queryParts, @NonNull List<QueryParameterBinding> parameterBindings, @NonNull Map<String, String> additionalRequiredParameters, int max, long offset) Creates a new encoded query.static @NonNull QueryResult
of
(@NonNull String query, @NonNull List<String> queryParts, @NonNull List<QueryParameterBinding> parameterBindings, @NonNull Map<String, String> additionalRequiredParameters, int max, long offset, @Nullable Collection<JoinPath> joinPaths) Creates a new encoded query.static @NonNull QueryResult
of
(@NonNull String query, @NonNull List<String> queryParts, @NonNull List<QueryParameterBinding> parameterBindings, @Nullable Collection<JoinPath> joinPaths) Creates a new encoded query.
-
Method Details
-
getQuery
- Returns:
- A string representation of the original query.
-
getUpdate
- Returns:
- A string representation of the update part.
-
getAggregate
Deprecated, for removal: This API element is subject to removal in a future version.Not used- Returns:
- A string representation of the aggregate part.
-
getQueryParts
- Returns:
- A string parts representation of the original query.
-
getParameters
A map containing the parameter names and the references to theArgument
names which define the values. These can be used to resolve the runtime values to bind to the prepared statement.- Returns:
- The map
-
getParameterTypes
- Returns:
- The computed parameter types.
-
getParameterBindings
List<QueryParameterBinding> getParameterBindings()Returns the parameters binding for this query.- Returns:
- the parameters binding
-
getAdditionalRequiredParameters
Returns additional required parameters.- Returns:
- the additional required parameters
-
getMax
default int getMax() -
getOffset
default long getOffset() -
getJoinPaths
Gets the join paths.- Returns:
- the join paths or empty
-
of
@NonNull static @NonNull QueryResult of(@NonNull @NonNull String query, @NonNull @NonNull List<QueryParameterBinding> parameterBindings) Creates a new encoded query.- Parameters:
query
- The queryparameterBindings
- The parameters binding- Returns:
- The query
- Since:
- 4.10
-
of
@NonNull static @NonNull QueryResult of(@NonNull @NonNull String query, @NonNull @NonNull List<String> queryParts, @NonNull @NonNull List<QueryParameterBinding> parameterBindings, @NonNull @NonNull Map<String, String> additionalRequiredParameters) Creates a new encoded query.- Parameters:
query
- The queryqueryParts
- The queryPartsparameterBindings
- The parameters bindingadditionalRequiredParameters
- Additional required parameters to execute the query- Returns:
- The query
-
of
@NonNull static @NonNull QueryResult of(@NonNull @NonNull String query, @NonNull @NonNull List<String> queryParts, @NonNull @NonNull List<QueryParameterBinding> parameterBindings) Creates a new encoded query.- Parameters:
query
- The queryqueryParts
- The queryPartsparameterBindings
- The parameters binding- Returns:
- The query
-
of
@NonNull static @NonNull QueryResult of(@NonNull @NonNull String query, @NonNull @NonNull List<String> queryParts, @NonNull @NonNull List<QueryParameterBinding> parameterBindings, @NonNull @NonNull Map<String, String> additionalRequiredParameters, int max, long offset) Creates a new encoded query.- Parameters:
query
- The queryqueryParts
- The queryPartsparameterBindings
- The parameters bindingadditionalRequiredParameters
- Additional required parameters to execute the querymax
- The query limitoffset
- The query offset- Returns:
- The query
-
of
@NonNull static @NonNull QueryResult of(@NonNull @NonNull String query, @NonNull @NonNull List<String> queryParts, @NonNull @NonNull List<QueryParameterBinding> parameterBindings, @NonNull @NonNull Map<String, String> additionalRequiredParameters, int max, long offset, @Nullable @Nullable Collection<JoinPath> joinPaths) Creates a new encoded query.- Parameters:
query
- The queryqueryParts
- The queryPartsparameterBindings
- The parameters bindingadditionalRequiredParameters
- Additional required parameters to execute the querymax
- The query limitoffset
- The query offsetjoinPaths
- The join paths- Returns:
- The query
-
of
@NonNull static @NonNull QueryResult of(@NonNull @NonNull String query, @NonNull @NonNull List<String> queryParts, @NonNull @NonNull List<QueryParameterBinding> parameterBindings, int max, long offset, @Nullable @Nullable Collection<JoinPath> joinPaths) Creates a new encoded query.- Parameters:
query
- The queryqueryParts
- The queryPartsparameterBindings
- The parameters bindingmax
- The query limitoffset
- The query offsetjoinPaths
- The join paths- Returns:
- The query
-
of
@NonNull static @NonNull QueryResult of(@NonNull @NonNull String query, @NonNull @NonNull List<String> queryParts, @NonNull @NonNull List<QueryParameterBinding> parameterBindings, @Nullable @Nullable Collection<JoinPath> joinPaths) Creates a new encoded query.- Parameters:
query
- The queryqueryParts
- The queryPartsparameterBindings
- The parameters bindingjoinPaths
- The join paths- Returns:
- The query
-