Add a choice of DB connection establishment
CHANGES:
Changes based on https://mongodb.github.io/node-mongodb-native/3.5/api/
- Added new adapter property databaseConnection(with 2 values to choose from: "connect on startup" or "connect on request"). Detailed description is in the tooltip.
-
when "connect on request" mode selected, then adapter goes online (green/green) unconditionally
-
made public methods async to simplify code (they did not return anything but just executed passed in callback upon completion anyway)
-
fixed set object in reserveNextRecord(...) (it had nested:
$set: {$set: {...}}
)
TEST:
WFs used for test(in both connection modes "connect on startup" and "connect on request"):
Edited by Bogdan Tabor