Works with specified collection from MongoDB "acolyte" resolved using given Mongo DB.
Works with specified collection from MongoDB "acolyte" resolved using given Mongo DB.
Previously resolved Mongo DB
the name of the collection
Function applied to resolved Mongo collection
import reactivemongo.api.Collection import acolyte.reactivemongo.AcolyteDSL // handler: ConnectionHandler val s: Future[String] = AcolyteDSL.withDB(handler) { db => AcolyteDSL.withCollection(db, "colName") { col => "Result" } }
Works with specified collection from MongoDB "acolyte" resolved using given connection.
Works with specified collection from MongoDB "acolyte" resolved using given connection.
Previously initialized connection
the name of the collection
Function applied to resolved Mongo collection
import reactivemongo.api.Collection import acolyte.reactivemongo.AcolyteDSL // handler: ConnectionHandler val s: Future[String] = AcolyteDSL.withFlatConnection(handler) { con => AcolyteDSL.withCollection(con, "colName") { col => "Result" } }
WithDriver.withDB[T]
Works with specified collection from MongoDB "acolyte" resolved using given driver initialized with Acolyte for ReactiveMongo (should not be used with other driver instances).
Works with specified collection from MongoDB "acolyte"
resolved using given driver initialized with Acolyte for ReactiveMongo
(should not be used with other driver instances).
Driver and associated resources are released
after the function f
the result Future
is completed.
Connection manager parameter (see ConnectionManager)
the name of the collection
Function applied to resolved Mongo collection
import reactivemongo.api.Collection import acolyte.reactivemongo.AcolyteDSL // handler: ConnectionHandler val s: Future[String] = AcolyteDSL.withCollection(handler, "colName") { col => "Result" }
AcolyteDSL.withDB[A,B]
Functions to work with a Mongo collection (provided DB functions).