Class QueryOptions


  • public class QueryOptions
    extends java.lang.Object
    Encapsulates options for configuring Fauna queries, such as timeout, linearized reads, typechecking, query tags, and trace parent for distributed tracing.
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  QueryOptions.Builder
      Builder class for constructing instances of QueryOptions.
    • Constructor Summary

      Constructors 
      Constructor Description
      QueryOptions​(QueryOptions.Builder builder)
      Creates an instance of QueryOptions using the specified builder.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static QueryOptions.Builder builder()
      Creates and returns a new Builder instance for constructing QueryOptions.
      static QueryOptions getDefault()
      Default QueryOptions instance with default configurations.
      java.util.Optional<java.lang.Boolean> getLinearized()
      Returns an Optional indicating if linearized reads are enabled.
      java.util.Optional<QueryTags> getQueryTags()
      Returns an Optional of the query tags.
      java.util.Optional<java.lang.Long> getTimeoutMillis()
      Returns an Optional of the query timeout duration in milliseconds.
      java.util.Optional<java.lang.String> getTraceParent()
      Returns an Optional of the trace parent for distributed tracing.
      java.util.Optional<java.lang.Boolean> getTypeCheck()
      Returns an Optional indicating if type checking is enabled.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • QueryOptions

        public QueryOptions​(QueryOptions.Builder builder)
        Creates an instance of QueryOptions using the specified builder.
        Parameters:
        builder - the builder with values for query options.
    • Method Detail

      • getDefault

        public static QueryOptions getDefault()
        Default QueryOptions instance with default configurations.
        Returns:
        a new QueryOptions instance with defaults.
      • getLinearized

        public java.util.Optional<java.lang.Boolean> getLinearized()
        Returns an Optional indicating if linearized reads are enabled.
        Returns:
        an Optional containing the linearized setting, or empty if not specified.
      • getTypeCheck

        public java.util.Optional<java.lang.Boolean> getTypeCheck()
        Returns an Optional indicating if type checking is enabled.
        Returns:
        an Optional containing the typeCheck setting, or empty if not specified.
      • getTimeoutMillis

        public java.util.Optional<java.lang.Long> getTimeoutMillis()
        Returns an Optional of the query timeout duration in milliseconds.
        Returns:
        an Optional containing the query timeout duration in milliseconds, or empty if not specified.
      • getQueryTags

        public java.util.Optional<QueryTags> getQueryTags()
        Returns an Optional of the query tags.
        Returns:
        an Optional containing the QueryTags, or empty if not specified.
      • getTraceParent

        public java.util.Optional<java.lang.String> getTraceParent()
        Returns an Optional of the trace parent for distributed tracing.
        Returns:
        an Optional containing the traceParent, or empty if not specified.
      • builder

        public static QueryOptions.Builder builder()
        Creates and returns a new Builder instance for constructing QueryOptions.
        Returns:
        a new Builder instance.