| 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(); |