providers.mongodb.MongoDbDaoFactory
A MongoDB-based provider implementing the DaoFactoryProtocol.
Usage
providers.mongodb.MongoDbDaoFactory()Methods
| Name | Description |
|---|---|
| __init__() | Initialize the provider with configuration parameter. |
| construct() | Yields a MongoDbDaoFactory instance with the provided configuration. |
__init__()
Initialize the provider with configuration parameter.
Usage
__init__(*, config, client)Parameters
config: MongoDbConfig-
MongoDB-specific config parameters.
client: AsyncMongoClient- An instance of an async MongoDB client.
construct()
Yields a MongoDbDaoFactory instance with the provided configuration.
Usage
construct(*, config)The client connection is established and closed automatically.