Cursor

reactivemongo.api.Cursor$
See theCursor companion trait
object Cursor

Cursor companion object

Attributes

Companion:
trait
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
Cursor.type

Members list

Concise view

Type members

Classlikes

final class Cont[T] extends State[T]

Continue with given value

Continue with given value

Attributes

Companion:
object
Graph
Supertypes
trait State[T]
class Object
trait Matchable
class Any
object Cont

Attributes

Companion:
class
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
Cont.type
final class Done[T] extends State[T]

Successfully stop processing with given value

Successfully stop processing with given value

Attributes

Companion:
object
Graph
Supertypes
trait State[T]
class Object
trait Matchable
class Any
object Done

Attributes

Companion:
class
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
Done.type
final class Fail[T] extends State[T]

Ends processing due to failure of given cause

Ends processing due to failure of given cause

Attributes

Companion:
object
Graph
Supertypes
trait State[T]
class Object
trait Matchable
class Any
object Fail

Attributes

Companion:
class
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
Fail.type
case object NoSuchResultException extends NoSuchElementException with NoStackTrace

Indicates that a required result cannot be found.

Indicates that a required result cannot be found.

Attributes

Graph
Supertypes
trait Singleton
trait Product
trait Mirror
trait Product
trait Equals
class NoSuchElementException
class RuntimeException
class Exception
class Throwable
trait Serializable
class Object
trait Matchable
class Any
Self type
final class Reference(val collectionName: String, val cursorId: Long, val numberToReturn: Int, val tailable: Boolean, val pinnedNode: Option[String])

'''EXPERIMENTAL'''

'''EXPERIMENTAL'''

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
final class Result[T]

'''EXPERIMENTAL'''

'''EXPERIMENTAL'''

Attributes

Companion:
object
Graph
Supertypes
class Object
trait Matchable
class Any
object Result

'''EXPERIMENTAL'''

'''EXPERIMENTAL'''

Attributes

Companion:
class
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
Result.type
sealed trait State[T]

A state of the cursor processing.

A state of the cursor processing.

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
class Cont[T]
class Done[T]
class Fail[T]

Types

type ErrorHandler[A] = (A, Throwable) => State[A]

Attributes

A

the state type

See also:
type WithOps[T] = Cursor[T] & CursorOps[T]

Value members

Concrete methods

def ContOnError[A](callback: (A, Throwable) => Unit): () => A

Error handler to continue on error (see Cursor.foldWhile and Cont).

Error handler to continue on error (see Cursor.foldWhile and Cont).

Attributes

callback

the callback function applied on last (possibily initial) value and the encountered error

def DoneOnError[A](callback: (A, Throwable) => Unit): () => A

Error handler to end on error (see Cursor.foldWhile and Done).

Error handler to end on error (see Cursor.foldWhile and Done).

Attributes

callback

the callback function applied on last (possibily initial) value and the encountered error

def FailOnError[A](callback: (A, Throwable) => Unit): () => A

Error handler to fail on error (see Cursor.foldWhile and Fail).

Error handler to fail on error (see Cursor.foldWhile and Fail).

Attributes

callback

the callback function applied on last (possibily initial) value and the encountered error

def Ignore[A](callback: A => Unit): (Unit, A) => State[Unit]

Value handler, ignoring the values (see Cursor.foldWhile and Cont).

Value handler, ignoring the values (see Cursor.foldWhile and Cont).

Attributes

callback

the callback function applied on each value.

def flatten[T, C <: (Cursor)](future: Future[C[T]])(implicit fs: CursorFlattener[C]): C[T]

Flattens the given future reactivemongo.api.Cursor to a reactivemongo.api.FlattenedCursor.

import scala.concurrent.Future
import reactivemongo.api.Cursor

def flatCursor[T](cursor: Future[Cursor[T]]): Cursor[T] =
 Cursor.flatten(cursor)

Attributes