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

Method constructor

packages/mongodb/src/MongoConnection.ts:53–65  ·  view source on GitHub ↗
(config: Configuration, options?: ConnectionOptions, type: ConnectionType = 'write')

Source from the content-addressed store, hash-verified

51 #db?: Db;
52
53 constructor(config: Configuration, options?: ConnectionOptions, type: ConnectionType = 'write') {
54 super(config, options, type);
55
56 // @ts-ignore
57 ObjectId.prototype[Symbol.for('nodejs.util.inspect.custom')] = function () {
58 return `ObjectId('${this.toHexString()}')`;
59 };
60
61 // @ts-ignore
62 Date.prototype[Symbol.for('nodejs.util.inspect.custom')] = function () {
63 return `ISODate('${this.toISOString()}')`;
64 };
65 }
66
67 async connect(options?: { skipOnConnect?: boolean }): Promise<void> {
68 this.getClient();

Callers

nothing calls this directly

Calls 1

forMethod · 0.80

Tested by

no test coverage detected