WithDB
Functions to work with MongoDB (provided driver functions).
Attributes
- Graph
- Supertypes
- class Objecttrait Matchableclass Any
- Known subtypes
- object AcolyteDSL.type
- Self type
Members list
Value members
Concrete methods
Works with a 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.
Works with a 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.
Attributes
- conParam
the connection manager parameter (see ConnectionManager)
- f
the function applied to initialized Mongo DB
import scala.concurrent.{ ExecutionContext, Future } import reactivemongo.api.{ DB, AsyncDriver } import acolyte.reactivemongo.{ AcolyteDSL, ConnectionHandler } def s(handler: ConnectionHandler)( implicit ec: ExecutionContext, d: AsyncDriver): Future[String] = AcolyteDSL.withDB(handler) { (_: DB) => "Result" }
- See also:
AcolyteDSL.withConnection
Works with a Mongo database 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.
Works with a Mongo database 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.
Attributes
- conParam
the connection manager parameter (see ConnectionManager)
- f
the function applied to initialized Mongo DB
import scala.concurrent.{ ExecutionContext, Future } import reactivemongo.api.{ DB, AsyncDriver } import acolyte.reactivemongo.{ AcolyteDSL, ConnectionHandler } def s(handler: ConnectionHandler)( implicit ec: ExecutionContext, d: AsyncDriver): Future[String] = AcolyteDSL.withDB(handler, "my_db") { (_: DB) => "Result" }
- name
the name of database
- setName
the name of the replica set (if some)
- See also:
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).
Attributes
- con
a previously initialized connection
- f
the function applied to initialized Mongo DB
import scala.concurrent.ExecutionContext import reactivemongo.api.{ DB, AsyncDriver } import acolyte.reactivemongo.{ AcolyteDSL, ConnectionHandler } def s(handler: ConnectionHandler)( implicit ec: ExecutionContext, d: AsyncDriver) = AcolyteDSL.withConnection(handler) { con => AcolyteDSL.withDB(con) { (_: DB) => "Result" } }
- See also:
AcolyteDSL.withConnection
Works with a Mongo database resolved using given driver initialized using Acolyte for ReactiveMongo (should not be used with other driver instances).
Works with a Mongo database resolved using given driver initialized using Acolyte for ReactiveMongo (should not be used with other driver instances).
Attributes
- con
a previously initialized connection
- f
the function applied to initialized Mongo DB
import scala.concurrent.{ ExecutionContext, Future } import reactivemongo.api.{ DB, AsyncDriver } import acolyte.reactivemongo.{ AcolyteDSL, ConnectionHandler } // handler: ConnectionHandler def s(handler: ConnectionHandler)( implicit ec: ExecutionContext, d: AsyncDriver): Future[String] = AcolyteDSL.withConnection(handler) { con => AcolyteDSL.withDB(con, "my_db") { (_: DB) => "Result" } }
- name
the name of database
- See also:
AcolyteDSL.withConnection