-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(connect): support promise for connectionString (#41)
There are cases where it's useful to have a synchronous reference to the Database, and where the connection information is not yet available - particularly in test cases where you may be launching a temporary mongo database using mongo-memory-server. To better support this use-case, the Database class can accept and store the connectionString parameter as a Promise, and resolve it to its value in the connect handler which is already well-positioned to wait for asynchronous resolution.
- Loading branch information
Showing
3 changed files
with
80 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters