Interface QueryResult


public interface QueryResult
Used to represent a built query that is computed at compilation time.
Since:
1.0
Author:
graemerocher
  • Method Details

    • getQuery

      @NonNull @NonNull String getQuery()
      Returns:
      A string representation of the original query.
    • getUpdate

      @Nullable default @Nullable String getUpdate()
      Returns:
      A string representation of the update part.
    • getAggregate

      @Nullable default @Nullable String getAggregate()
      Returns:
      A string representation of the aggregate part.
    • getQueryParts

      @NonNull @NonNull List<String> getQueryParts()
      Returns:
      A string parts representation of the original query.
    • getParameters

      @NonNull default @NonNull Map<String,String> getParameters()
      A map containing the parameter names and the references to the Argument names which define the values. These can be used to resolve the runtime values to bind to the prepared statement.
      Returns:
      The map
    • getParameterTypes

      @NonNull default @NonNull Map<String,DataType> getParameterTypes()
      Returns:
      The computed parameter types.
    • getParameterBindings

      List<QueryParameterBinding> getParameterBindings()
      Returns the parameters binding for this query.
      Returns:
      the parameters binding
    • getAdditionalRequiredParameters

      Map<String,String> getAdditionalRequiredParameters()
      Returns additional required parameters.
      Returns:
      the additional required parameters
    • getMax

      default int getMax()
    • getOffset

      default long getOffset()
    • getJoinPaths

      @NonNull default @NonNull Collection<JoinPath> getJoinPaths()
      Gets the join paths.
      Returns:
      the join paths or empty
    • 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 query
      queryParts - The queryParts
      parameterBindings - The parameters binding
      additionalRequiredParameters - 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, @NonNull @NonNull Map<String,String> additionalRequiredParameters, int max, long offset)
      Creates a new encoded query.
      Parameters:
      query - The query
      queryParts - The queryParts
      parameterBindings - The parameters binding
      additionalRequiredParameters - Additional required parameters to execute the query
      max - The query limit
      offset - 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 query
      queryParts - The queryParts
      parameterBindings - The parameters binding
      additionalRequiredParameters - Additional required parameters to execute the query
      max - The query limit
      offset - The query offset
      joinPaths - The join paths
      Returns:
      The query