Works with Mongo database (named "acolyte") resolved using given driver initialized using Acolyte for ReactiveMongo (should not be used with other driver instances).
Works with Mongo database (named "acolyte") resolved using given driver initialized using Acolyte for ReactiveMongo (should not be used with other driver instances).
Previously initialized connection
Function applied to initialized Mongo DB
import reactivemongo.api.DB import acolyte.reactivemongo.AcolyteDSL // handler: ConnectionHandler val s: Future[String] = AcolyteDSL withConnection(handler) { con => AcolyteDSL withDB(con) { db => val d: DB = db "Result" } }
withFlatDB[T]
AcolyteDSL.withConnection
Works with Mongo database (named "acolyte") resolved using given driver initialized using Acolyte for ReactiveMongo (should not be used with other driver instances).
Works with Mongo database (named "acolyte") resolved using given driver
initialized using 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)
Function applied to initialized Mongo DB
import reactivemongo.api.DB import acolyte.reactivemongo.AcolyteDSL // handler: ConnectionHandler val s: Future[String] = AcolyteDSL withDB(handler) { db => val d: DB = db "Result" }
withFlatDB[A,B]
AcolyteDSL.withConnection
Works with Mongo database (named "acolyte") resolved using given driver initialized using Acolyte for ReactiveMongo (should not be used with other driver instances).
Works with Mongo database (named "acolyte") resolved using given driver initialized using Acolyte for ReactiveMongo (should not be used with other driver instances).
Previously initialized connection
Function applied to initialized Mongo DB
import reactivemongo.api.DB import acolyte.reactivemongo.AcolyteDSL // handler: ConnectionHandler val s: Future[String] = AcolyteDSL withConnection(handler) { con => AcolyteDSL withDB(con) { db => val d: DB = db Future.successful("Result") } }
withFlatDB[T]
AcolyteDSL.withConnection
Works with Mongo database (named "acolyte") resolved using given driver initialized using Acolyte for ReactiveMongo (should not be used with other driver instances).
Works with Mongo database (named "acolyte") resolved using given driver initialized using Acolyte for ReactiveMongo (should not be used with other driver instances).
Connection manager parameter (see ConnectionManager)
Function applied to initialized Mongo DB
import reactivemongo.api.DB import acolyte.reactivemongo.AcolyteDSL // handler: ConnectionHandler val s: Future[String] = AcolyteDSL withFlatDB(handler) { db => val d: DB = db Future.successful("Result") }
withDB[A,B]
AcolyteDSL.withFlatConnection
Functions to work with Mongo DB (provided driver functions).