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

Method getCollection

packages/mongodb/src/MongoConnection.ts:139–141  ·  view source on GitHub ↗
(name: EntityName<T> | string)

Source from the content-addressed store, hash-verified

137 }
138
139 getCollection<T extends object>(name: EntityName<T> | string): Collection<T> {
140 return this.getDb().collection<T>(this.getCollectionName(name));
141 }
142
143 async createCollection<T extends object>(name: EntityName<T>): Promise<Collection<T>> {
144 return this.getDb().createCollection(this.getCollectionName(name));

Callers 15

_findMethod · 0.95
aggregateMethod · 0.95
streamAggregateMethod · 0.95
runQueryMethod · 0.95
createIndexesMethod · 0.45
createUniqueIndexesMethod · 0.45
createPropertyIndexesMethod · 0.45
getCollectionFunction · 0.45
GH4371.test.tsFile · 0.45
upMethod · 0.45

Calls 2

getDbMethod · 0.95
getCollectionNameMethod · 0.95

Tested by 2

upMethod · 0.36
upMethod · 0.36