Class QueryConfig

java.lang.Object
org.neo4j.driver.QueryConfig
All Implemented Interfaces:
Serializable

public final class QueryConfig extends Object implements Serializable
Query configuration used by Driver.executableQuery(String) and its variants.
Since:
5.5
See Also:
  • Method Details

    • defaultConfig

      public static QueryConfig defaultConfig()
      Returns default config value.
      Returns:
      config value
    • builder

      public static QueryConfig.Builder builder()
      Creates a new QueryConfig.Builder used to construct a configuration object with default implementation returning EagerResult.
      Returns:
      a query configuration builder
    • routing

      public RoutingControl routing()
      Returns routing mode for the query.
      Returns:
      routing mode
    • database

      public Optional<String> database()
      Returns target database for the query.
      Returns:
      target database
    • impersonatedUser

      public Optional<String> impersonatedUser()
      Returns impersonated user for the query.
      Returns:
      impersonated user
    • bookmarkManager

      public Optional<BookmarkManager> bookmarkManager(BookmarkManager defaultBookmarkManager)
      Returns bookmark manager for the query.
      Parameters:
      defaultBookmarkManager - default bookmark manager to use when none has been configured explicitly,
      Returns:
      bookmark manager
    • timeout

      public Optional<Duration> timeout()
      Get the configured transaction timeout.
      Returns:
      an Optional containing the configured timeout or Optional.empty() otherwise
      Since:
      5.16
    • metadata

      public Map<String,Serializable> metadata()
      Get the configured transaction metadata.
      Returns:
      metadata or empty map when it is not configured
      Since:
      5.16
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object