Package ai.velr

Class QueryOptions

java.lang.Object
ai.velr.QueryOptions

public final class QueryOptions extends Object
Query execution options for bounded result previews and Cypher parameter binding.

Parameters are bound out of band. Query text uses $name; parameter names passed to this API omit the leading dollar sign.

  • Method Details

    • defaults

      public static QueryOptions defaults()
      Return default query options.
      Returns:
      options with no row cap and no parameters
    • builder

      public static QueryOptions.Builder builder()
      Create a query-options builder.
      Returns:
      new builder
    • maxResultRows

      public static QueryOptions maxResultRows(long maxResultRows)
      Create options that cap rows returned by each result table.
      Parameters:
      maxResultRows - maximum rows per result table; use zero to return only column metadata
      Returns:
      query options with the row cap set
    • maxResultRows

      public Long maxResultRows()
      Return the row cap for each result table.
      Returns:
      maximum row count, or null when uncapped
    • params

      public Map<String,Object> params()
      Return bound openCypher parameters.
      Returns:
      immutable parameter map
    • withParam

      public QueryOptions withParam(String name, Object value)
      Return a copy of these options with one additional parameter.
      Parameters:
      name - parameter name without a leading $
      value - parameter value
      Returns:
      updated query options
    • withParams

      public QueryOptions withParams(Map<String,?> values)
      Return a copy of these options with additional parameters.
      Parameters:
      values - parameter map; keys omit the leading $
      Returns:
      updated query options