MongoDocumentStore
Defined in: packages/providers/storage/mongodb/src/docStore/MongoDBDocumentStore.ts:13
Extends
KVDocumentStore
Constructors
Constructor
new MongoDocumentStore(
__namedParameters
):MongoDocumentStore
Defined in: packages/providers/storage/mongodb/src/docStore/MongoDBDocumentStore.ts:14
Parameters
__namedParameters
MongoDBDocumentStoreConfig
Returns
MongoDocumentStore
Overrides
KVDocumentStore.constructor
Methods
fromMongoClient()
static
fromMongoClient(mongoClient
,dbName
,collectionName
):MongoDocumentStore
Defined in: packages/providers/storage/mongodb/src/docStore/MongoDBDocumentStore.ts:30
Static method for creating an instance using a MongoClient.
Parameters
mongoClient
MongoClient
MongoClient instance
dbName
string
= DEFAULT_DATABASE
Database name
collectionName
string
= DEFAULT_COLLECTION
Collection name
Returns
MongoDocumentStore
Instance of MongoDBDocumentStore
Example
fromConnectionString()
static
fromConnectionString(connectionString
,dbName
,collectionName
):MongoDocumentStore
Defined in: packages/providers/storage/mongodb/src/docStore/MongoDBDocumentStore.ts:57
Static method for creating an instance using a connection string.
Parameters
connectionString
string
MongoDB connection string
dbName
string
= DEFAULT_DATABASE
Database name
collectionName
string
= DEFAULT_COLLECTION
Collection name
Returns
MongoDocumentStore
Instance of MongoDBDocumentStore