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

Method getClient

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

Source from the content-addressed store, hash-verified

129 }
130
131 getClient(): MongoClient {
132 if (!this.#client) {
133 this.createClient();
134 }
135
136 return this.#client!;
137 }
138
139 getCollection<T extends object>(name: EntityName<T> | string): Collection<T> {
140 return this.getDb().collection<T>(this.getCollectionName(name));

Callers 12

connectMethod · 0.95
getDbMethod · 0.95
beginMethod · 0.95
getKyselyMethod · 0.80
checkConnectionFunction · 0.80
beginFunction · 0.80
streamFunction · 0.80
executeDumpFunction · 0.80
connectMethod · 0.80
executeMethod · 0.80
executeDumpMethod · 0.80

Calls 1

createClientMethod · 0.95

Tested by

no test coverage detected