QueryBuilder

com.outr.arango.collection.QueryBuilder
class QueryBuilder[R](graph: Graph, val query: Query, val converter: Json => R)

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes

Members list

Value members

Concrete methods

def all: IO[List[R]]

Convenience method to get the results from the stream as a List

Convenience method to get the results from the stream as a List

Attributes

def as[T](implicit rw: RW[T]): QueryBuilder[T]

Translates the results to a return type of T

Translates the results to a return type of T

Type parameters

T

return type

Value parameters

rw

the RW for conversion

Attributes

Returns

QueryBuilder[T]

def count: IO[Int]

Streams the result to return a count. A query that generates a count would be more efficient.

Streams the result to return a count. A query that generates a count would be more efficient.

Attributes

def first: IO[Option[R]]

The first result from the stream if there are any results.

The first result from the stream if there are any results.

Attributes

def iterator: IO[Iterator[R]]
def last: IO[Option[R]]

The last result from the stream if there are any results.

The last result from the stream if there are any results.

Attributes

def one: IO[R]

Retrieves exactly one result from the query. If there is zero or more than one an exception will be thrown.

Retrieves exactly one result from the query. If there is zero or more than one an exception will be thrown.

Attributes

Returns

IO[R]

def process(processor: (DBQueue, R) => IO[DBQueue], batchSize: Int): IO[ProcessStats]

Process through the stream with the ability to batch queue db inserts, upserts, and deletes.

Process through the stream with the ability to batch queue db inserts, upserts, and deletes.

Value parameters

batchSize

the maximum records to hold in memory for a specific collection and operation

processor

the function to handle processing the items in the stream

Attributes

Returns

IO[ProcessStats]

def stream: Stream[IO, R]

Creates a Stream to get all the results from the query

Creates a Stream to get all the results from the query

Attributes

Returns

fs2.Stream[IO, R]

override def toString: String

Returns a string representation of the object.

Returns a string representation of the object.

The default representation is platform dependent.

Attributes

Returns

a string representation of the object.

Definition Classes
Any

Concrete fields

val converter: Json => R
val query: Query