Package

acolyte

reactivemongo

Permalink

package reactivemongo

Visibility
  1. Public
  2. All

Type Members

  1. case class BDoc(underlying: BSONDocument) extends Product with Serializable

    Permalink

    BSONDocument wrapper for pattern matching

  2. sealed trait ConnectionHandler extends AnyRef

    Permalink

    Connection handler.

  3. trait ConnectionManager[T] extends AnyRef

    Permalink

    Connection manager

  4. trait DriverManager extends AnyRef

    Permalink

    Driver manager

  5. trait PreparedResponse extends AnyRef

    Permalink

    Response prepared for Mongo request executed with Acolyte driver.

  6. case class Property(name: String) extends Product with Serializable

    Permalink

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

    Extractor for BSON property, allowing partial and un-ordered match by name. Rich match syntax ~(Property(name), ...) requires use of http://acolyte.eu.org/scalac-plugin.html

    import reactivemongo.bson.{ BSONInteger, BSONString }
    import acolyte.reactivemongo.{ Request, SimpleBody, Property, & }
    
    val EmailXtr = Property("email") // Without scalac plugin
    
    request match {
      case Request("db.col", SimpleBody(~(Property("email"), 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.
        resultA
    
      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.
        resultB // similar to case resultA without scalac plugin
    
      case Request("db.col", SimpleBody(
        ~(Property("name"), BSONString("eman")))) =>
        // Request on db.col with an "name" string property with "eman" as value,
        // anywhere in properties (possibly with others which are ignored there).
        resultC
    
      case Request(colName, SimpleBody(
        ~(Property("age"), BSONInteger(age)) &
        ~(Property("email"), BSONString(v)))) =>
        // Request on any collection, with an "age" integer property
        // and an "email" string property, possibly not in this order.
        resultD
    
      case Request(colName, SimpleBody(
        ~(Property("age"), ValueDocument(
          ~(Property("$gt"), BSONInteger(minAge)))) &
        ~(Property("email"), BSONString("[email protected]")))) =>
        // Request on any collection, with an "age" property with itself
        // a operator property "$gt" having an integer value, and an "email"
        // property (at the same level as age), without order constraint.
        resultE
    
    }
    See also

    ValueDocument

    &

  7. sealed trait QueryHandler extends (Int, Request) ⇒ Option[Try[Response]]

    Permalink

    Query handler.

  8. trait QueryResponseMaker[T] extends (Int, T) ⇒ Option[Try[Response]]

    Permalink

    Creates a query response for given channel ID and result.

    Creates a query response for given channel ID and result.

    T

    Result type

  9. trait Request extends AnyRef

    Permalink

    Request executed against Mongo connection.

  10. trait WithCollection extends AnyRef

    Permalink

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

  11. trait WithDB extends AnyRef

    Permalink

    Functions to work with MongoDB (provided driver functions).

  12. trait WithDriver extends AnyRef

    Permalink

    Functions to work with driver.

  13. trait WithHandler extends AnyRef

    Permalink

    Functions to work with handler (provided driver functions).

  14. trait WithResult extends AnyRef

    Permalink

    Functions to work with result (provided collection functions).

  15. sealed trait WriteHandler extends (Int, WriteOp, Request) ⇒ Option[Try[Response]]

    Permalink

    Write handler.

  16. sealed trait WriteOp extends AnyRef

    Permalink

    Operator, along with request when writing.

  17. trait WriteResponseMaker[T] extends (Int, T) ⇒ Option[Try[Response]]

    Permalink

    Creates a write response for given channel ID and result.

    Creates a write response for given channel ID and result.

    T

    Result type

Value Members

  1. object &

    Permalink

    Meta-extractor, to combine extractor on BSON properties.

    Meta-extractor, to combine extractor on BSON properties.

    See also

    Property

    SimpleBody

  2. object AcolyteDSL extends WithDriver with WithDB with WithCollection with WithHandler with WithResult

    Permalink

    Acolyte DSL for ReactiveMongo.

  3. object ConnectionHandler

    Permalink

    Companion object for connection handler.

  4. object ConnectionManager

    Permalink

    Connection manage companion.

  5. object CountRequest

    Permalink

    Body extractor for Count request.

    Body extractor for Count request.

    See also

    SimpleBody

  6. object DeleteOp extends WriteOp with Product with Serializable

    Permalink

    Delete operator

  7. object DeleteRequest

    Permalink

    Delete request

  8. object DriverManager

    Permalink

    Driver manage companion.

  9. object InClause

    Permalink

    In clause extractor ($in with BSONArray; e.g.

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

  10. object InsertOp extends WriteOp with Product with Serializable

    Permalink

    Insert operator

  11. object InsertRequest

    Permalink

    Insert request

  12. object MongoDB

    Permalink
  13. object NotInClause

    Permalink

    Not-In clause extractor.

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

  14. object QueryHandler

    Permalink

    Query handler companion.

  15. object QueryResponse

    Permalink

    Query response factory.

  16. object QueryResponseMaker

    Permalink

    Response maker companion.

  17. object Request

    Permalink

    Request companion

  18. object RequestBody

    Permalink

    Complete request body extractor; Matches body with many documents.

  19. object SimpleBody

    Permalink

    Body extractor for simple request, with only one document.

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

  20. object UpdateOp extends WriteOp with Product with Serializable

    Permalink

    Update operator

  21. object UpdateRequest

    Permalink

    Update request

  22. object ValueDocument

    Permalink

    Extractor of properties for a document used a BSON value (when operator is used, e.g.

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

    See also

    Property

    Request

  23. object ValueList

    Permalink

    Extracts values of BSON array as list.

    Extracts values of BSON array as list.

    See also

    ValueDocument

  24. object WriteHandler

    Permalink

    Write handler companion.

  25. object WriteResponse

    Permalink

    Write response factory.

  26. object WriteResponseMaker

    Permalink

    Response maker companion.

Ungrouped