Works with specified collection from Mongo database "acolyte" resolved using given Mongo DB.
Works with specified collection from Mongo database "acolyte" resolved using given Mongo DB.
Previously resolved Mongo DB
Collection name
Function applied to resolved Mongo collection
import reactivemongo.api.Collection import acolyte.reactivemongo.AcolyteDSL // handler: ConnectionHandler val s: Future[String] = AcolyteDSL.withFlatDB(handler) { db => AcolyteDSL.withCollection(db, "colName") { col => "Result" } }
Works with specified collection from Mongo database "acolyte" resolved using given connection.
Works with specified collection from Mongo database "acolyte" resolved using given connection.
Previously initialized connection
Collection name
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.withFlatDB[T]
Works with specified collection from Mongo database "acolyte" resolved using given driver initialized with Acolyte for ReactiveMongo (should not be used with other driver instances).
Works with specified collection from Mongo database "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)
Collection name
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.withFlatDB[A,B]
Works with specified collection from Mongo database "acolyte" resolved using given Mongo DB.
Works with specified collection from Mongo database "acolyte" resolved using given Mongo DB.
Previously resolved Mongo DB
Collection name
Function applied to resolved Mongo collection
import reactivemongo.api.Collection import acolyte.reactivemongo.AcolyteDSL // handler: ConnectionHandler val i: Future[Int] = AcolyteDSL.withFlatDB(handler) { db => AcolyteDSL.withFlatCollection(db, "colName") { col => Future(1 + 2) } }
Works with specified collection from Mongo database "acolyte" resolved using given connection.
Works with specified collection from Mongo database "acolyte" resolved using given connection.
Previously initialized connection
Collection name
Function applied to resolved Mongo collection
import reactivemongo.api.Collection import acolyte.reactivemongo.AcolyteDSL // handler: ConnectionHandler val i: Future[Int] = AcolyteDSL.withFlatConnection(handler) { con => AcolyteDSL.withFlatCollection(con, "colName") { col => Future(1 + 2) } }
WithDriver.withFlatDB[T]
Works with specified collection from Mongo database "acolyte" resolved using given driver initialized with Acolyte for ReactiveMongo (should not be used with other driver instances).
Works with specified collection from Mongo database "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)
Collection name
Function applied to resolved Mongo collection
import reactivemongo.api.Collection import acolyte.reactivemongo.AcolyteDSL // handler: ConnectionHandler val i: Future[Int] = AcolyteDSL.withFlatCollection(handler, "colName") { col => Future(1 + 2) }
AcolyteDSL.withFlatDB[A,B]
Functions to work with a Mongo collection (provided DB functions).