AkkaStreamFlattenedCursor
Value members
Concrete methods
Inherited methods
Returns a Reactive Streams publisher of bulks from this cursor.
Returns a Reactive Streams publisher of bulks from this cursor.
- Value parameters:
- err
The binary operator to be applied when failing to get the next response. Exception or
Fail
raised within thesuc
function cannot be recovered by this error handler.- fanout
see [[http://doc.akka.io/api/akka/2.4.7/index.html#akka.stream.scaladsl.Sink$@asPublisherT:akka.stream.scaladsl.Sink[T,org.reactivestreams.Publisher[T]] Sink.asPublisher]] (default: false)
- m
the stream materializer
- maxDocs
the maximum number of documents to be retrieved
- Inherited from:
- AkkaStreamCursor
Returns a Reactive Streams publisher of documents from this cursor.
Returns a Reactive Streams publisher of documents from this cursor.
- Value parameters:
- err
The binary operator to be applied when failing to get the next response. Exception or
Fail
raised within thesuc
function cannot be recovered by this error handler.- fanout
see [[http://doc.akka.io/api/akka/2.4.7/index.html#akka.stream.scaladsl.Sink$@asPublisherT:akka.stream.scaladsl.Sink[T,org.reactivestreams.Publisher[T]] Sink.asPublisher]] (default: false)
- m
the stream materializer
- maxDocs
the maximum number of documents to be retrieved
- Inherited from:
- AkkaStreamCursor
Applies a binary operator to a start value and all elements retrieved by this cursor, going first to last.
Applies a binary operator to a start value and all elements retrieved by this cursor, going first to last.
- Type parameters:
- A
the result type of the binary operator
import scala.concurrent.ExecutionContext import reactivemongo.api.Cursor case class Person(name: String, age: Int) def foo(cursor: Cursor[Person])(implicit ec: ExecutionContext) = cursor.foldWhile(Nil: Seq[Person])((s, p) => Cursor.Cont(s :+ p), { (l, e) => println("last valid value: " + l); Cursor.Fail(e) })
- Value parameters:
- err
The binary operator to be applied when failing to get the next response. Exception or Fail raised within the
suc
function cannot be recovered by this error handler.- maxDocs
the maximum number of documents to be retrieved (-1 for unlimited).
- suc
The binary operator to be applied when the next document is successfully read.
- z
the initial value
- Inherited from:
- Cursor
- Inherited from:
- FlattenedCursor
- Inherited from:
- FlattenedCursor