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).
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" } }
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.
Driver manager parameter (see DriverManager)
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" }
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).
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") } }
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 manager parameter (see DriverManager)
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") }
Functions to work with Mongo DB (provided driver functions).