Constructors
constructor
-
Parameters
Properties
app
client
client: MongoClient
db
db: Db
Methods
aggregate
-
Parameters
-
collection_name: string
-
-
Default value _: {} = {}
-
Default value output_options: OutputOptions = {}
Returns Promise<any[]>
createIndex
- createIndex(collection_name: string, index: any, options?: Parameters<MongoCollection["createIndex"]>[1]): Promise<string>
-
Parameters
-
collection_name: string
-
index: any
-
Optional options: Parameters<MongoCollection["createIndex"]>[1]
Returns Promise<string>
create_index
- create_index(collection: Collection): Promise<void>
-
Parameters
Returns Promise<void>
find
- find(collection_name: string, query: any, options?: Parameters<MongoCollection["find"]>[1], output_options?: OutputOptions): Promise<any[]>
-
Parameters
-
collection_name: string
-
query: any
-
Default value options: Parameters<MongoCollection["find"]>[1] = {}
-
Default value output_options: OutputOptions = {}
Returns Promise<any[]>
insert
- insert(collection_name: string, to_insert: any, options?: Parameters<MongoCollection["insertOne"]>[1]): Promise<any>
-
Parameters
-
collection_name: string
-
to_insert: any
-
Optional options: Parameters<MongoCollection["insertOne"]>[1]
Returns Promise<any>
post_start
- post_start(): Promise<void>
-
Returns Promise<void>
remove
- remove(collection_name: string, query: any, just_one: boolean): Promise<DeleteWriteOpResultObject>
-
Parameters
-
collection_name: string
-
query: any
-
just_one: boolean
Returns Promise<DeleteWriteOpResultObject>
start
-
Returns Promise<void>
stop
-
Returns void
update
- update(collection_name: string, query: any, new_value: any): Promise<UpdateWriteOpResult>
-
Parameters
-
collection_name: string
-
query: any
-
new_value: any
Returns Promise<UpdateWriteOpResult>