Package datomic

Class QueryRequest

java.lang.Object
datomic.QueryRequest

public class QueryRequest extends Object
Container for parameters to Peer.query(QueryRequest)
Since:
0.9.5153
  • Field Details

    • ARGS

      public static final Object ARGS
    • QUERY

      public static final Object QUERY
    • TIMEOUT

      public static final Object TIMEOUT
  • Method Details

    • create

      public static QueryRequest create(Object query, Object... inputs)
      Creates a QueryRequest object. query and inputs take the same form as described in Peer.query(Object, Object...)
      Parameters:
      query - a data structure describing the query
      inputs - inputs bound to the names in :in section of query
      Returns:
      a QueryRequest object that can be passed to Peer.query(QueryRequest)
    • timeout

      public QueryRequest timeout(long timeoutMsec)

      The number of milliseconds after which a query may be stopped.

      Note: timeout is approximate, it is meant to protect against long running queries, but is not guaranteed to stop after precisely the duration specified.

      Parameters:
      timeoutMsec - number of milliseconds after which a query may be stopped.
      Returns:
      A reference to the updated QueryRequest so methods can be chained together.
    • toString

      public String toString()
      Overrides:
      toString in class Object
      Returns:
      A string representation of the QueryRequest
    • asData

      public Map asData()
      Returns:
      A Map representation of the QueryRequest