We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4a6447c commit e461f17Copy full SHA for e461f17
src/collection.ts
@@ -192,6 +192,13 @@ export class Collection<TSchema extends Document = Document> {
192
this.client = db.client;
193
}
194
195
+ /**
196
+ * Get the database object for the collection.
197
+ */
198
+ get db(): Db {
199
+ return this.s.db;
200
+ }
201
+
202
/**
203
* The name of the database this collection belongs to
204
*/
src/db.ts
@@ -126,7 +126,7 @@ export class Db {
126
/** @internal */
127
s: DbPrivate;
128
129
- /** @internal */
+ /** @public */
130
readonly client: MongoClient;
131
132
public static SYSTEM_NAMESPACE_COLLECTION = CONSTANTS.SYSTEM_NAMESPACE_COLLECTION;
0 commit comments