Skip to content

Conversation

aherlihy
Copy link
Contributor

@aherlihy aherlihy commented Jun 13, 2020

  • Add an initialDb field to the service providers and set db to that DB on connect. Also add DEFAULT_DB to service provider core so that we have one place where we set the initial db.
  • move cli-options and uri-generator into the core service provider because they both need to be used when calling connect or new Mongo, otherwise connect('localhost:27017') will fail since the driver doesn't accept that URI.
  • for the case connect(<uri>/<db>), to avoid having to write our own uri parser (and we can't use the node driver one since the URIs need to be called from the shell-api (which is required by browser/etc), we get the initial DB via the service provider. This means that it will connect to the DB set in the URI in both the CLI and Compass.

@aherlihy aherlihy force-pushed the db branch 2 times, most recently from 9a97422 to 8a2e0cd Compare June 13, 2020 17:18
Copy link
Contributor

@lrlna lrlna left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good!

@lrlna
Copy link
Contributor

lrlna commented Jun 15, 2020

I think the tests failing on windows, are actual fails.

@aherlihy aherlihy merged commit 864d021 into master Jun 15, 2020
@aherlihy aherlihy deleted the db branch June 15, 2020 13:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants