mongodb / mongo-jdbc-driver

JDBC Driver for MongoDB Atlas SQL interface
Apache License 2.0
36 stars 33 forks source link

SQL-1132: adds support for default db in url #122

Closed terakilobyte closed 1 year ago

terakilobyte commented 1 year ago

This commit adds support for specifying the database in the url. When specifying a default database, the authSource option must be specified unless the default database is also the authentication database (not the case for ADF). Because of the changes I removed a test and changed the URL in another test since they became valid.

Documentation changes will be required, and I think it might make sense to ask Atlas to update the connection modal for jdbc to show the default database in the URL, i.e. jdbc:mongodb://your-server/default?ssl=true&authSource=admin and perhaps remove the database field? cc @alexiantonino on this idea.

I did also check with @alexiantonino and we won't be making any changes to the tableau connection interface. In that instance, the database specified will always override the URI database if someone were to include it there, but it requires fewer changes outside of us.

terakilobyte commented 1 year ago

@nbagnard I pushed some updates and a new connection string test file for us to discuss that I believe captures the exact behavior we want.

terakilobyte commented 1 year ago

evergreen merge