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 ComposeWithCompletion[Out] extends AnyRef

    Permalink
  3. sealed trait ConnectionHandler extends AnyRef

    Permalink

    Connection handler.

  4. trait ConnectionManager[T] extends AnyRef

    Permalink

    Connection manager

  5. trait DriverManager extends AnyRef

    Permalink

    Driver manager

  6. sealed trait LowPriorityCompose extends AnyRef

    Permalink
  7. trait PreparedResponse extends AnyRef

    Permalink

    Response prepared for Mongo request executed with Acolyte driver.

  8. 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

    &

  9. sealed trait QueryHandler extends (ChannelId, Request) ⇒ Option[Try[Response]]

    Permalink

    Query handler.

  10. trait QueryResponseMaker[T] extends (ChannelId, 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

  11. trait Request extends AnyRef

    Permalink

    Request executed against Mongo connection.

  12. trait WithCollection extends AnyRef

    Permalink

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

  13. trait WithDB extends AnyRef

    Permalink

    Functions to work with MongoDB (provided driver functions).

  14. trait WithDriver extends AnyRef

    Permalink

    Functions to work with driver.

  15. trait WithHandler extends AnyRef

    Permalink

    Functions to work with handler (provided driver functions).

  16. trait WithResult extends AnyRef

    Permalink

    Functions to work with result (provided collection functions).

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

    Permalink

    Write handler.

  18. sealed trait WriteOp extends AnyRef

    Permalink

    Operator, along with request when writing.

  19. trait WriteResponseMaker[T] extends (ChannelId, 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 CommandRequest

    Permalink

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

  4. object ComposeWithCompletion extends LowPriorityCompose

    Permalink
  5. object ConnectionHandler

    Permalink

    Companion object for connection handler.

  6. object ConnectionManager

    Permalink

    Connection manage companion.

  7. object CountRequest

    Permalink

    Body extractor for Count request.

    Body extractor for Count request.

    See also

    SimpleBody

  8. object DeleteOp extends WriteOp with Product with Serializable

    Permalink

    Delete operator

  9. object DeleteRequest

    Permalink

    Delete request

  10. object DriverManager

    Permalink

    Driver manage companion.

  11. object FindAndModifyRequest

    Permalink

    Request extractor for the findAndModify command

  12. object InClause

    Permalink

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

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

  13. object InsertOp extends WriteOp with Product with Serializable

    Permalink

    Insert operator

  14. object InsertRequest

    Permalink

    Insert request

  15. object MongoDB

    Permalink
  16. object NotInClause

    Permalink

    Not-In clause extractor.

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

  17. object QueryHandler

    Permalink

    Query handler companion.

  18. object QueryResponse

    Permalink

    Query response factory.

  19. object QueryResponseMaker

    Permalink

    Response maker companion.

  20. object Request

    Permalink

    Request companion

  21. object RequestBody

    Permalink

    Complete request body extractor; Matches body with many documents.

  22. 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.

  23. object UpdateElement

    Permalink

    Update request

  24. object UpdateOp extends WriteOp with Product with Serializable

    Permalink

    Update operator

  25. object UpdateRequest

    Permalink

    Update request

  26. 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

  27. object ValueList

    Permalink

    Extracts values of BSON array as list.

    Extracts values of BSON array as list.

    See also

    ValueDocument

  28. object WriteHandler

    Permalink

    Write handler companion.

  29. object WriteResponse

    Permalink

    Write response factory.

  30. object WriteResponseMaker

    Permalink

    Response maker companion.

Ungrouped