bpmn-server / MongoDB
Class: MongoDB#
Table of contents#
Constructors#
Properties#
Methods#
- profilerStart
- profilerEnd
- getClient
- find
- createIndex
- insert
- update
- update2
- remove
- removeById
- connect
Constructors#
constructor#
• new MongoDB(dbConfig
, logger
): MongoDB
Parameters#
Name | Type |
---|---|
dbConfig |
any |
logger |
any |
Returns#
Defined in#
Properties#
client#
• client: any
Defined in#
dbConfig#
• dbConfig: any
Defined in#
logger#
• logger: any
Defined in#
operation#
• operation: any
Defined in#
Methods#
profilerStart#
▸ profilerStart(operation
): void
Parameters#
Name | Type |
---|---|
operation |
any |
Returns#
void
Defined in#
profilerEnd#
▸ profilerEnd(): void
Returns#
void
Defined in#
getClient#
▸ getClient(): Promise
\<any
>
Returns#
Promise
\<any
>
Defined in#
find#
▸ find(dbName
, collName
, qry
, projection?
): Promise
\<unknown
>
Parameters#
Name | Type | Default value |
---|---|---|
dbName |
any |
undefined |
collName |
any |
undefined |
qry |
any |
undefined |
projection |
any |
null |
Returns#
Promise
\<unknown
>
Defined in#
createIndex#
▸ createIndex(dbName
, collName
, index
, unique?
): Promise
\<unknown
>
Parameters#
Name | Type |
---|---|
dbName |
any |
collName |
any |
index |
any |
unique |
Object |
Returns#
Promise
\<unknown
>
Defined in#
insert#
▸ insert(dbName
, collName
, docs
): Promise
\<unknown
>
Parameters#
Name | Type |
---|---|
dbName |
any |
collName |
any |
docs |
any |
Returns#
Promise
\<unknown
>
Defined in#
update#
▸ update(dbName
, collName
, query
, updateObject
, options?
): Promise
\<unknown
>
Parameters#
Name | Type |
---|---|
dbName |
any |
collName |
any |
query |
any |
updateObject |
any |
options |
Object |
Returns#
Promise
\<unknown
>
Defined in#
update2#
▸ update2(dbName
, collName
, query
, updateObject
, options?
): Promise
\<unknown
>
Parameters#
Name | Type |
---|---|
dbName |
any |
collName |
any |
query |
any |
updateObject |
any |
options |
Object |
Returns#
Promise
\<unknown
>
Defined in#
remove#
▸ remove(dbName
, collName
, query
): Promise
\<unknown
>
Parameters#
Name | Type |
---|---|
dbName |
any |
collName |
any |
query |
any |
Returns#
Promise
\<unknown
>
Defined in#
removeById#
▸ removeById(dbName
, collName
, id
): Promise
\<unknown
>
Parameters#
Name | Type |
---|---|
dbName |
any |
collName |
any |
id |
any |
Returns#
Promise
\<unknown
>
Defined in#
connect#
▸ connect(): Promise
\<unknown
>
Returns#
Promise
\<unknown
>