MCPcopy Create free account
hub / github.com/mikro-orm/mikro-orm / getDb

Method getDb

packages/mongodb/src/MongoConnection.ts:176–179  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

174 }
175
176 getDb(): Db {
177 this.#db ??= this.getClient().db(this.config.get('dbName'));
178 return this.#db;
179 }
180
181 async execute(query: string): Promise<any> {
182 throw new Error(`${this.constructor.name} does not support generic execute method`);

Callers 8

getCollectionMethod · 0.95
createCollectionMethod · 0.95
listCollectionsMethod · 0.95
dropCollectionMethod · 0.95
dropIndexesMethod · 0.80
getDbFunction · 0.80
upMethod · 0.80

Calls 2

getClientMethod · 0.95
getMethod · 0.65

Tested by 1

upMethod · 0.64