c

neotypes.query

DeferredQuery

final class DeferredQuery[T, RT <: ResultType] extends BaseQuery

Represents a query that produces results when executed.

T

the type of the value(s) that will be returned.

Source
query.scala
See also

The parametrized queries documentation.

Linear Supertypes
Type Hierarchy
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. DeferredQuery
  2. BaseQuery
  3. AnyRef
  4. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. val RT: RT
  5. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  6. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @IntrinsicCandidate() @native()
  7. def collectAs[F[_], C](factory: Factory[T, C], tx: AsyncTransaction[F]): F[RT.AsyncR[C]]

    Executes the query and returns all results as a collection of values.

    Executes the query and returns all results as a collection of values.

    F

    async type.

    C

    collection type.

    factory

    a Scala factory of the collection that will be collected.

    tx

    neotypes transaction.

    returns

    An asyncual value that will compute a collection of T elements.

    Example:
    1. val result: F[List[Person]] = driver.transact { tx =>
        "MATCH (p: Person) RETURN p"
          .query(ResultMapper[Person])
          .collectAs(List, tx)
      }
  8. def collectAs[F[_], C](factory: Factory[T, C], driver: AsyncDriver[F], config: TransactionConfig = TransactionConfig.default): F[RT.AsyncR[C]]

    Executes the query and returns all results as a collection of values.

    Executes the query and returns all results as a collection of values.

    F

    async type.

    C

    collection type.

    factory

    a Scala factory of the collection that will be collected.

    driver

    neotypes driver.

    config

    neotypes transaction config.

    returns

    An asyncual value that will compute a collection of T elements.

    Example:
    1. val result: F[List[Person]] =
        "MATCH (p: Person) RETURN p"
          .query(ResultMapper[Person])
          .collectAs(List, driver)
  9. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  10. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  11. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @IntrinsicCandidate() @native()
  12. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @IntrinsicCandidate() @native()
  13. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  14. def list[F[_]](tx: AsyncTransaction[F]): F[RT.AsyncR[List[T]]]

    Executes the query and returns a scala.List of values.

    Executes the query and returns a scala.List of values.

    F

    async type.

    tx

    neotypes transaction.

    returns

    An asyncual value that will compute a List of T elements.

    Example:
    1. val result: F[List[Person]] = driver.transact { tx =>
        "MATCH (p: Person) RETURN p"
          .query(ResultMapper[Person])
          .list(tx)
      }
  15. def list[F[_]](driver: AsyncDriver[F], config: TransactionConfig = TransactionConfig.default): F[RT.AsyncR[List[T]]]

    Executes the query and returns a scala.List of values.

    Executes the query and returns a scala.List of values.

    F

    async type.

    driver

    neotypes driver.

    config

    neotypes transaction config.

    returns

    An asyncual value that will compute a List of T elements.

    Example:
    1. val result: F[List[Person]] =
        "MATCH (p: Person) RETURN p"
          .query(ResultMapper[Person])
          .list(driver)
  16. def map[F[_], K, V](tx: AsyncTransaction[F])(implicit ev: <:<[T, (K, V)]): F[RT.AsyncR[Map[K, V]]]

    Executes the query and returns a scala.Predef.Map of values.

    Executes the query and returns a scala.Predef.Map of values.

    F

    async type.

    K

    keys type.

    V

    values type.

    tx

    neotypes transaction.

    ev

    evidence that T is a tuple (K, V).

    returns

    An asyncual value that will compute a Map of key-value elements.

    Example:
    1. val result: F[Map[String, Person]] = driver.transact { tx =>
        "MATCH (p: Person) RETURN elementId(p), p"
          .query(ResultMapper[(String, Person)])
          .map(tx)
      }
  17. def map[F[_], K, V](driver: AsyncDriver[F], config: TransactionConfig = TransactionConfig.default)(implicit ev: <:<[T, (K, V)]): F[RT.AsyncR[Map[K, V]]]

    Executes the query and returns a scala.Predef.Map of values.

    Executes the query and returns a scala.Predef.Map of values.

    F

    async type.

    K

    keys type.

    V

    values type.

    driver

    neotypes driver.

    config

    neotypes transaction config.

    ev

    evidence that T is a tuple (K, V).

    returns

    An asyncual value that will compute a Map of key-value elements.

    Example:
    1. val result: F[Map[String, Person]] =
        "MATCH (p: Person) RETURN elementId(p), p"
          .query(ResultMapper[(String, Person)])
          .map(driver)
  18. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  19. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @IntrinsicCandidate() @native()
  20. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @IntrinsicCandidate() @native()
  21. val params: Map[String, QueryParam]

    The parameters that will be substituted into the query statement.

    The parameters that will be substituted into the query statement.

    Definition Classes
    DeferredQueryBaseQuery
  22. val query: String

    The query statement that will be executed.

    The query statement that will be executed.

    Definition Classes
    DeferredQueryBaseQuery
  23. def set[F[_]](tx: AsyncTransaction[F]): F[RT.AsyncR[Set[T]]]

    Executes the query and returns a scala.Predef.Set of values.

    Executes the query and returns a scala.Predef.Set of values.

    F

    async type.

    tx

    neotypes transaction.

    returns

    An asyncual value that will compute a Set of T elements.

    Example:
    1. val result: F[Set[Person]] = driver.transact { tx =>
        "MATCH (p: Person) RETURN p"
          .query(ResultMapper[Person])
          .set(tx)
      }
  24. def set[F[_]](driver: AsyncDriver[F], config: TransactionConfig = TransactionConfig.default): F[RT.AsyncR[Set[T]]]

    Executes the query and returns a scala.Predef.Set of values.

    Executes the query and returns a scala.Predef.Set of values.

    F

    async type.

    driver

    neotypes driver.

    config

    neotypes transaction config.

    returns

    An asyncual value that will compute a Set of T elements.

    Example:
    1. val result: F[Set[Person]] =
        "MATCH (p: Person) RETURN p"
          .query(ResultMapper[Person])
          .set(driver)
  25. def single[F[_]](tx: AsyncTransaction[F]): F[RT.AsyncR[T]]

    Executes the query and returns the unique / first value.

    Executes the query and returns the unique / first value.

    F

    async type.

    tx

    neotypes transaction.

    returns

    An asyncual value that will compute a single T element.

    Example:
    1. val result: F[(Person, Movie)] = driver.transact { tx =>
        "MATCH (p: Person {name: 'Charlize Theron'})-[]->(m: Movie) RETURN p, m"
          .query(ResultMapper[(Person, Movie)])
          .single(tx)
      }
    Note

    May fail if the query doesn't return exactly one record.

  26. def single[F[_]](driver: AsyncDriver[F], config: TransactionConfig = TransactionConfig.default): F[RT.AsyncR[T]]

    Executes the query and returns the unique / first value.

    Executes the query and returns the unique / first value.

    F

    async type.

    driver

    neotypes driver.

    config

    neotypes transaction config.

    returns

    An asyncual value that will compute a single T element.

    Example:
    1. val result: F[(Person, Movie)] =
        "MATCH (p: Person {name: 'Charlize Theron'})-[]->(m: Movie) RETURN p, m"
          .query(ResultMapper[(Person, Movie)])
          .single(driver)
    Note

    May fail if the query doesn't return exactly one record.

  27. def stream[S[_], F[_]](tx: StreamTransaction[S, F], chunkSize: Int): S[RT.StreamR[T]]

    Executes the query and returns a Stream of values.

    Executes the query and returns a Stream of values.

    S

    stream type.

    F

    async type.

    tx

    neotypes transaction.

    chunkSize

    number of elements to pull each time from the database; by default 256.

    returns

    An stream of T elements.

    Example:
    1. val result: S[F, Person] = streamDriver.streamTransact { tx =>
        "MATCH (p: Person) RETURN p"
          .query(ResultMapper[Person])
          .stream(tx)
      }
    See also

    The stream documentation.

  28. def stream[S[_], F[_]](tx: StreamTransaction[S, F]): S[RT.StreamR[T]]

    Executes the query and returns a Stream of values.

    Executes the query and returns a Stream of values.

    S

    stream type.

    F

    async type.

    tx

    neotypes transaction.

    returns

    An stream of T elements.

    Example:
    1. val result: S[F, Person] = streamDriver.streamTransact { tx =>
        "MATCH (p: Person) RETURN p"
          .query(ResultMapper[Person])
          .stream(tx)
      }
    See also

    The stream documentation.

  29. def stream[S[_], F[_]](driver: StreamDriver[S, F], config: TransactionConfig = TransactionConfig.default, chunkSize: Int = 256): S[RT.StreamR[T]]

    Executes the query and returns a Stream of values.

    Executes the query and returns a Stream of values.

    S

    stream type.

    F

    async type.

    driver

    neotypes driver.

    config

    neotypes transaction config.

    chunkSize

    number of elements to pull each time from the database; by default 256.

    returns

    An stream of T elements.

    Example:
    1. val result: S[F, Person] =
        "MATCH (p: Person) RETURN p"
          .query(ResultMapper[Person])
          .stream(streamDriver)
    See also

    The stream documentation.

  30. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  31. final def toString(): String
    Definition Classes
    BaseQuery → AnyRef → Any
  32. def vector[F[_]](tx: AsyncTransaction[F]): F[RT.AsyncR[Vector[T]]]

    Executes the query and returns a scala.Vector of values.

    Executes the query and returns a scala.Vector of values.

    F

    async type.

    tx

    neotypes transaction.

    returns

    An asyncual value that will compute a Vector of T elements.

    Example:
    1. val result: F[Vector[Person]] = driver.transact { tx =>
        "MATCH (p: Person) RETURN p"
          .query(ResultMapper[Person])
          .vector(tx)
      }
  33. def vector[F[_]](driver: AsyncDriver[F], config: TransactionConfig = TransactionConfig.default): F[RT.AsyncR[Vector[T]]]

    Executes the query and returns a scala.Vector of values.

    Executes the query and returns a scala.Vector of values.

    F

    async type.

    driver

    neotypes driver.

    config

    neotypes transaction config.

    returns

    An asyncual value that will compute a Vector of T elements.

    Example:
    1. val result: F[Vector[Person]] =
        "MATCH (p: Person) RETURN p"
          .query(ResultMapper[Person])
          .vector(driver)
  34. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  35. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  36. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  37. def withParams(params: Map[String, QueryParam]): DeferredQuery[T, RT]

    Creates a new query with an updated set of parameters.

    Creates a new query with an updated set of parameters.

    params

    QueryParams to be added.

    returns

    a new query with params added to existing params.

    Definition Classes
    DeferredQueryBaseQuery
    Note

    If params contains a key that is already present in the current query, the new value one will override the previous one.

  38. def withResultSummary(implicit ev: <:<[RT, Simple.type]): DeferredQuery[T, WithResultSummary.type]

    Transforms this simple query, into one that preserves the org.neo4j.driver.summary.ResultSummary of its executions.

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable]) @Deprecated
    Deprecated

    (Since version 9)

Inherited from BaseQuery

Inherited from AnyRef

Inherited from Any

Ungrouped