protected
abstract
cachingMethods: { provider?: CacheProvider | (string & { }); set: TCacheSetter; get: TCacheGetter; del: TCacheDelete; }
clients: MongoClient[]
models: Map<string, MongoModel<ObjectValidator<any>>>
protected
postConnectEvents: Array<(connectionIndex: number) => void | Promise<void>>
protected
postDisconnectEvents: Array<(connectionIndex: number) => void | Promise<void>>
protected
preConnectEvents: Array<(connectionIndex: number) => void | Promise<void>>
protected
preDisconnectEvents: Array<(connectionIndex: number) => void | Promise<void>>
protected
deleteCache(key: string)
disconnect(connectionIndex?: number): Promise<void>
isConnected(connectionIndex?: number)
Is database connected?
model<T extends ObjectValidator<any>>()
protected
setCache()
setCachingMethods(options: { provider?: CacheProvider | (string & { }); setter: TCacheSetter; getter: TCacheGetter; deleter: TCacheDelete; }): void
transaction<T>()
Helper method to execute database transactions
useCaching<T extends TCacheValue>(callback: () => Promise<T>,cache?: TCacheOptions,)