Works with a MongoDB driver handling only queries,
using given query handler
.
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.
Query handler
import reactivemongo.api.MongoConnection import acolyte.reactivemongo.{ AcolyteDSL, Request } AcolyteDSL.withQueryHandler({ req: Request ⇒ aResponse }) { d => val con: MongoConnection = d "aResult" }
Works with a MongoDB driver handling only write operations,
using given write handler
.
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.
Writer handler
import reactivemongo.api.MongoConnection import acolyte.reactivemongo.{ AcolyteDSL, Request, WriteOp } AcolyteDSL.withWriteHandler({ cmd: (WriteOp, Request) ⇒ aResp }) { d => val con: MongoConnection = d "aResult" }
Functions to work with handler (provided driver functions).