acolyte.reactivemongo

Type members

Classlikes

@SuppressWarnings(scala.Array.apply[java.lang.String]("ObjectNames")(scala.reflect.ClassTag.apply[java.lang.String](classOf[java.lang.String])))
object &

Meta-extractor, to combine extractor on BSON properties.

Meta-extractor, to combine extractor on BSON properties.

See also:

Acolyte DSL for ReactiveMongo.

Acolyte DSL for ReactiveMongo.

case class BDoc(underlying: BSONDocument)

BSONDocument wrapper for pattern matching

BSONDocument wrapper for pattern matching

Request extractor for any command (at DB or collection level)

Request extractor for any command (at DB or collection level)

sealed trait ComposeWithCompletion[Out]
Companion:
object
sealed trait ConnectionHandler

Connection handler.

Connection handler.

Companion:
object

Companion object for connection handler.

Companion object for connection handler.

Companion:
class

Connection manager

Connection manager

Companion:
object

Connection manage companion.

Connection manage companion.

Companion:
class

Body extractor for Count request.

Body extractor for Count request.

See also:
case object DeleteOp extends WriteOp

Delete operator

Delete operator

Delete request

Delete request

@implicitNotFound("Cannot find `acolyte.reactivemongo.DriverManager` (default one requires an `ExecutionContext`)")

Driver manager

Driver manager

Companion:
object

Driver manage companion.

Driver manage companion.

Companion:
class

Request extractor for the findAndModify command.

Request extractor for the findAndModify command.

See also:
object InClause

In clause extractor ($in with BSONArray; e.g. { '$in': [ ... ] })

In clause extractor ($in with BSONArray; e.g. { '$in': [ ... ] })

case object InsertOp extends WriteOp

Insert operator

Insert operator

Insert request

Insert request

sealed trait LowPriorityCompose
object MongoDB

Not-In clause extractor. ($nin with BSONArray; e.g. { '$nin': [ ... ] })

Not-In clause extractor. ($nin with BSONArray; e.g. { '$nin': [ ... ] })

Response prepared for Mongo request executed with Acolyte driver.

Response prepared for Mongo request executed with Acolyte driver.

case class Property(name: String)

Extractor for BSON property, allowing partial and un-ordered match by name.

Extractor for BSON property, allowing partial and un-ordered match by name.

import reactivemongo.api.bson.BSONString
import acolyte.reactivemongo.{
 PreparedResponse, Property, Request, SimpleBody
}

val EmailXtr = Property("email") // Without scalac plugin

def resultA: PreparedResponse = ???
def resultB: PreparedResponse = ???
def resultC: PreparedResponse = ???
def resultD: PreparedResponse = ???
def resultE: PreparedResponse = ???

def check(request: Request) = request match {
 case Request("db.col", SimpleBody(EmailXtr(BSONString(e)))) =>
   // Request on db.col with an "email" string property,
   // anywhere in properties (possibly with others which are ignored there),
   // with `e` bound to extracted string value.
   println(e)
   resultB // similar to case resultA without scalac plugin

 case req =>
   sys.error("Unexpected request: " + req)
}
See also:
sealed trait QueryHandler extends (ChannelId, Request) => Option[Try[Response]]

Query handler.

Query handler.

Companion:
object

Query handler companion.

Query handler companion.

Companion:
class

Query response factory.

Query response factory.

trait QueryResponseMaker[T] extends (ChannelId, T) => Option[Try[Response]]

Creates a query response for given channel ID and result.

Creates a query response for given channel ID and result.

Type parameters:
T

Result type

Companion:
object

Response maker companion.

Response maker companion.

Companion:
class
trait Request

Request executed against Mongo connection.

Request executed against Mongo connection.

Companion:
object
object Request

Request companion

Request companion

Companion:
class

Complete request body extractor; Matches body with many documents.

Complete request body extractor; Matches body with many documents.

object SimpleBody

Body extractor for simple request, with only one document. If there are more than one document, matching just ignore extra ones.

Body extractor for simple request, with only one document. If there are more than one document, matching just ignore extra ones.

Request extractor for startSession command (at DB level).

Request extractor for startSession command (at DB level).

import acolyte.reactivemongo.{ Request, StartSessionRequest }

def isStart(req: Request): Boolean = req match {
 case StartSessionRequest() => true
 case _ => false
}

Update request

Update request

case object UpdateOp extends WriteOp

Update operator

Update operator

Update request

Update request

Extractor of properties for a document used a BSON value (when operator is used, e.g. { 'age': { '$gt': 10 } }).

Extractor of properties for a document used a BSON value (when operator is used, e.g. { 'age': { '$gt': 10 } }).

See also:
object ValueList

Extracts values of BSON array as list.

Extracts values of BSON array as list.

See also:

Functions to work with a Mongo collection (provided DB functions).

Functions to work with a Mongo collection (provided DB functions).

trait WithDB

Functions to work with MongoDB (provided driver functions).

Functions to work with MongoDB (provided driver functions).

Functions to work with driver.

Functions to work with driver.

Functions to work with handler (provided driver functions).

Functions to work with handler (provided driver functions).

Functions to work with result (provided collection functions).

Functions to work with result (provided collection functions).

sealed trait WriteHandler extends (ChannelId, WriteOp, Request) => Option[Try[Response]]

Write handler.

Write handler.

Companion:
object

Write handler companion.

Write handler companion.

Companion:
class
sealed trait WriteOp

Operator, along with request when writing.

Operator, along with request when writing.

Write response factory.

Write response factory.

trait WriteResponseMaker[T] extends (ChannelId, T) => Option[Try[Response]]

Creates a write response for given channel ID and result.

Creates a write response for given channel ID and result.

Type parameters:
T

Result type

Companion:
object

Response maker companion.

Response maker companion.

Companion:
class