c

neotypes

DeferredQuery

final case class DeferredQuery[T] extends Product with Serializable

Represents a Neo4j query that can be asynchronously on a effect type.

T

the type of the value that will be returned when the query is executed.

See also

The parametrized queries documentation.

Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. DeferredQuery
  2. Serializable
  3. Product
  4. Equals
  5. AnyRef
  6. 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. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native()
  6. def collectAs[C](factory: Factory[T, C]): CollectAsPartiallyApplied[T, C]

    Executes the query and returns a custom collection of values.

    Executes the query and returns a custom collection of values.

    C

    collection type to be constructed.

    factory

    the type of the custom collection to return.

    returns

    An effectual value that will compute a Collection of T elements.

    Example:
    1. val result: F[ListMap[Person, Movie]] =
        "MATCH (p:Person {name: 'Charlize Theron'})-[]->(m:Movie) RETURN p,m"
          .query[(Person, Movie)]
          .collectAs(ListMap)(driver)
  7. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  8. def execute[F[_]](tx: Transaction[F])(implicit em: ExecutionMapper[T]): F[T]

    Executes the query and ignores its output.

    Executes the query and ignores its output.

    F

    effect type.

    tx

    neotypes transaction.

    returns

    An effectual value that will execute the query.

    Example:
    1. val deferredQuery =
        "CREATE (p:Person { name: 'Charlize Theron', born: 1975 })"
      
      driver.transact(tx => deferredQuery.execute(tx))
  9. def execute[F[_]](driver: Driver[F], config: TransactionConfig = TransactionConfig.default)(implicit em: ExecutionMapper[T]): F[T]

    Executes the query and ignores its output.

    Executes the query and ignores its output.

    F

    effect type.

    driver

    neotypes driver.

    config

    neotypes transaction config (optional).

    returns

    An effectual value that will execute the query.

    Example:
    1. "CREATE (p:Person { name: 'Charlize Theron', born: 1975 })"
        .query[Unit]
        .execute(driver)
  10. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable])
  11. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  12. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  13. def list[F[_]](tx: Transaction[F])(implicit rm: ResultMapper[T]): F[List[T]]

    Executes the query and returns a List of values.

    Executes the query and returns a List of values.

    F

    effect type.

    tx

    neotypes transaction.

    rm

    result mapper for type T.

    returns

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

    Example:
    1. val deferredQuery =
        "MATCH (p:Person {name: 'Charlize Theron'})-[]->(m:Movie) RETURN p,m".query[(Person, Movie)]
      
      val result: F[List[(Person, Movie)]] =
        driver.transact(tx => deferredQuery.list(tx))
  14. def list[F[_]](driver: Driver[F], config: TransactionConfig = TransactionConfig.default)(implicit rm: ResultMapper[T]): F[List[T]]

    Executes the query and returns a List of values.

    Executes the query and returns a List of values.

    F

    effect type.

    driver

    neotypes driver.

    config

    neotypes transaction config (optional).

    rm

    result mapper for type T.

    returns

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

    Example:
    1. val result: F[List[(Person, Movie)]] =
        "MATCH (p:Person {name: 'Charlize Theron'})-[]->(m:Movie) RETURN p,m"
          .query[(Person, Movie)]
          .list(driver)
  15. def map[F[_], K, V](tx: Transaction[F])(implicit ev: <:<[T, (K, V)], rm: ResultMapper[(K, V)]): F[Map[K, V]]

    Executes the query and returns a Map of values.

    Executes the query and returns a Map of values.

    F

    effect type.

    K

    keys type.

    V

    values type.

    tx

    neotypes transaction.

    ev

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

    rm

    result mapper for type (K, V).

    returns

    An effectual value that will compute a Map of key-value pairs.

    Example:
    1. val deferredQuery =
        "MATCH (p:Person {name: 'Charlize Theron'})-[]->(m:Movie) RETURN p,m".query[(Person, Movie)]
      
      val result: F[Map[Person, Movie]] =
        driver.transact(tx => deferredQuery.map(tx))
  16. def map[F[_], K, V](driver: Driver[F], config: TransactionConfig = TransactionConfig.default)(implicit ev: <:<[T, (K, V)], rm: ResultMapper[(K, V)]): F[Map[K, V]]

    Executes the query and returns a Map[K,V] of values.

    Executes the query and returns a Map[K,V] of values.

    F

    effect type.

    K

    keys type.

    V

    values type.

    driver

    neotypes driver.

    config

    neotypes transaction config (optional).

    ev

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

    rm

    result mapper for type (K, V).

    returns

    An effectual value that will compute a Map of key-value pairs.

    Example:
    1. val result: F[Map[Person, Movie]] =
        "MATCH (p:Person {name: 'Charlize Theron'})-[]->(m:Movie) RETURN p,m"
          .query[(Person, Movie)]
          .map(driver)
  17. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  18. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  19. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  20. val params: Map[String, QueryParam]
  21. def productElementNames: Iterator[String]
    Definition Classes
    Product
  22. val query: String
  23. def set[F[_]](tx: Transaction[F])(implicit rm: ResultMapper[T]): F[Set[T]]

    Executes the query and returns a Set of values.

    Executes the query and returns a Set of values.

    F

    effect type.

    tx

    neotypes transaction.

    rm

    result mapper for type T.

    returns

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

    Example:
    1. val deferredQuery =
        "MATCH (p:Person {name: 'Charlize Theron'})-[]->(m:Movie) RETURN p,m".query[(Person, Movie)]
      
      val result: F[Set[(Person, Movie)]] =
        driver.transact(tx => deferredQuery.set(tx))
  24. def set[F[_]](driver: Driver[F], config: TransactionConfig = TransactionConfig.default)(implicit rm: ResultMapper[T]): F[Set[T]]

    Executes the query and returns a Set of values.

    Executes the query and returns a Set of values.

    F

    effect type.

    driver

    neotypes driver.

    config

    neotypes transaction config (optional).

    rm

    result mapper for type T.

    returns

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

    Example:
    1. val result: F[Set[(Person, Movie)]] =
        "MATCH (p:Person {name: 'Charlize Theron'})-[]->(m:Movie) RETURN p,m"
          .query[(Person, Movie)]
          .set(driver)
  25. def single[F[_]](tx: Transaction[F])(implicit rm: ResultMapper[T]): F[T]

    Executes the query and returns the unique record in the result.

    Executes the query and returns the unique record in the result.

    F

    effect type.

    tx

    neotypes transaction.

    rm

    result mapper for type T.

    returns

    An effectual value that will compute a single T element.

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

    This will fail if the query returned more than a single result.

  26. def single[F[_]](driver: Driver[F], config: TransactionConfig = TransactionConfig.default)(implicit rm: ResultMapper[T]): F[T]

    Executes the query and returns the unique record in the result.

    Executes the query and returns the unique record in the result.

    F

    effect type.

    driver

    neotypes driver.

    config

    neotypes transaction config (optional).

    rm

    result mapper for type T.

    returns

    An effectual 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[(Person, Movie)]
          .single(driver)
    Note

    This will fail if the query returned more than a single result.

  27. def stream[S[_], F[_]](tx: StreamingTransaction[S, F])(implicit rm: ResultMapper[T]): S[T]

    Evaluate the query an get the results as a Stream.

    Evaluate the query an get the results as a Stream.

    S

    stream type.

    F

    effect type.

    tx

    neotypes transaction.

    rm

    result mapper for type T.

    returns

    An effectual Stream of T values.

    See also

    The streaming documentation.

  28. def stream[S[_], F[_]](driver: StreamingDriver[S, F], config: TransactionConfig = TransactionConfig.default)(implicit rm: ResultMapper[T]): S[T]

    Evaluate the query an get the results as a Stream.

    Evaluate the query an get the results as a Stream.

    S

    stream type.

    F

    effect type.

    driver

    neotypes driver.

    config

    neotypes transaction config (optional).

    rm

    result mapper for type T.

    returns

    An effectual Stream of T values.

    See also

    The streaming documentation.

  29. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  30. def vector[F[_]](tx: Transaction[F])(implicit rm: ResultMapper[T]): F[Vector[T]]

    Executes the query and returns a Vector of values.

    Executes the query and returns a Vector of values.

    F

    effect type.

    tx

    neotypes transaction.

    rm

    result mapper for type T.

    returns

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

    Example:
    1. val deferredQuery =
        "MATCH (p:Person {name: 'Charlize Theron'})-[]->(m:Movie) RETURN p,m".query[(Person, Movie)]
      
      val result: F[Vector[(Person, Movie)]] =
        driver.transact(tx => deferredQuery.vector(tx))
  31. def vector[F[_]](driver: Driver[F], config: TransactionConfig = TransactionConfig.default)(implicit rm: ResultMapper[T]): F[Vector[T]]

    Executes the query and returns a Vector of values.

    Executes the query and returns a Vector of values.

    F

    effect type.

    driver

    neotypes driver.

    config

    neotypes transaction config (optional).

    rm

    result mapper for type T.

    returns

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

    Example:
    1. val result: F[Vector[(Person, Movie)]] =
        "MATCH (p:Person {name: 'Charlize Theron'})-[]->(m:Movie) RETURN p,m"
          .query[(Person, Movie)]
          .vector(driver)
  32. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  33. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  34. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  35. def withParams(params: Map[String, QueryParam]): DeferredQuery[T]

    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

    DeferredQuery with params added to existing params.

    Note

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

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from AnyRef

Inherited from Any

Ungrouped