WithHandler
Functions to work with handler (provided driver functions).
Attributes
- Graph
- Supertypes
- class Objecttrait Matchableclass Any
- Known subtypes
- object AcolyteDSL.type
- Self type
Members list
Value members
Concrete methods
Works with a MongoDB driver handling only queries,
using given query handler
.
Driver and associated resources are released
after the function f
the result Future
is completed.
Works with a MongoDB driver handling only queries,
using given query handler
.
Driver and associated resources are released
after the function f
the result Future
is completed.
Attributes
- handler
Query handler
import scala.concurrent.ExecutionContext import reactivemongo.api.{ AsyncDriver, MongoConnection } import acolyte.reactivemongo.{ AcolyteDSL, PreparedResponse, Request } def aResponse: PreparedResponse = ??? def foo(implicit ec: ExecutionContext, d: AsyncDriver) = AcolyteDSL.withQueryHandler({ (_: Request) => aResponse }) { (_: MongoConnection) => "aResult" }
- See also:
Works with a MongoDB driver handling only write operations,
using given write handler
.
Driver and associated resources are released
after the function f
the result Future
is completed.
Works with a MongoDB driver handling only write operations,
using given write handler
.
Driver and associated resources are released
after the function f
the result Future
is completed.
Attributes
- handler
Writer handler
import scala.concurrent.ExecutionContext import reactivemongo.api.AsyncDriver import acolyte.reactivemongo.{ AcolyteDSL, PreparedResponse, Request, WriteOp } def aResp: PreparedResponse = ??? def foo(implicit ec: ExecutionContext, d: AsyncDriver) = AcolyteDSL.withWriteHandler({ (_: WriteOp, _: Request) => aResp }) { _ => "aResult" }
- See also: