Constructors
constructor
- new KeyMongo(options: keyOptions): KeyMongo
Properties
Readonly clientDb
clientDb: MongoClient
Methods
delete
- delete(collectionName: string, key: string | number): any
Parameters
collectionName: string
key: string | number
Returns any
deleteData
- deleteData(collectionName: string, key: string | number, insert: string | number): Promise<any>
Parameters
collectionName: string
key: string | number
insert: string | number
Returns Promise<any>
drop
- drop(collectionName: string): Promise<any>
Parameters
Returns Promise<any>
get
- get(collectionName: string, key: string | number): Promise<any>
Parameters
collectionName: string
key: string | number
Returns Promise<any>
has
- has(collectionName: string, key: string | number): Promise<any>
Parameters
collectionName: string
key: string | number
Returns Promise<any>
list
- list(collectionName: string): Promise<any>
Parameters
Returns Promise<any>
set
- set(collectionName: string, key: string | number, value: unknown): any
Parameters
collectionName: string
key: string | number
value: unknown
Returns any
updateData
- updateData(collectionName: string, key: string | number, insert: string | number, value: unknown): Promise<any>
Parameters
collectionName: string
key: string | number
insert: string | number
value: unknown
Returns Promise<any>
key_mongo.delete('database', 'user_1')