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.
- Alphabetic
- By Inheritance
- DeferredQuery
- Serializable
- Product
- Equals
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- 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.
val result: F[ListMap[Person, Movie]] = "MATCH (p:Person {name: 'Charlize Theron'})-[]->(m:Movie) RETURN p,m" .query[(Person, Movie)] .collectAs(ListMap)(driver)
Example: - final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- 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.
val deferredQuery = "CREATE (p:Person { name: 'Charlize Theron', born: 1975 })" driver.transact(tx => deferredQuery.execute(tx))
Example: - 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.
"CREATE (p:Person { name: 'Charlize Theron', born: 1975 })" .query[Unit] .execute(driver)
Example: - def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- 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.
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))
Example: - 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.
val result: F[List[(Person, Movie)]] = "MATCH (p:Person {name: 'Charlize Theron'})-[]->(m:Movie) RETURN p,m" .query[(Person, Movie)] .list(driver)
Example: - 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.
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))
Example: - 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.
val result: F[Map[Person, Movie]] = "MATCH (p:Person {name: 'Charlize Theron'})-[]->(m:Movie) RETURN p,m" .query[(Person, Movie)] .map(driver)
Example: - final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- val params: Map[String, QueryParam]
- def productElementNames: Iterator[String]
- Definition Classes
- Product
- val query: String
- 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.
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))
Example: - 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.
val result: F[Set[(Person, Movie)]] = "MATCH (p:Person {name: 'Charlize Theron'})-[]->(m:Movie) RETURN p,m" .query[(Person, Movie)] .set(driver)
Example: - 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.
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.
Example: - 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.
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.
Example: - 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
- 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
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- 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.
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))
Example: - 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.
val result: F[Vector[(Person, Movie)]] = "MATCH (p:Person {name: 'Charlize Theron'})-[]->(m:Movie) RETURN p,m" .query[(Person, Movie)] .vector(driver)
Example: - final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- 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.