Repository navigation
fix(connections): a URI connection without a name is named after the URI's host (#1257) - #1264
Merged
Merged
Conversation
…URI's host (#1257) Redis and MongoDB named it after the form's default host field (Redis localhost:6379), MySQL 'MySQL (URI)'. One helper, defaultConnectionName, now gives '<Type>: host:port' from the URI in all four forms (port: the URI's, else the type default; none for +srv), '<Type> (URI)' when the URI has no host. The form scenarios assert the name.
3 tasks
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
With an empty name and a URI, PostgreSQL named the connection after the URI's host, MySQL
MySQL (URI), and Redis and MongoDB after the form's host field (Redis localhost:6379), so several URI connections looked identical in the sidebar.defaultConnectionName(features/connections/connection_default_name.dart) is now used by all four forms:<Type>: host:portfrom the URI; the port is the URI's, else the type's default; a+srvURI has none (MongoDB: c0.example.net);<Type> (URI)when the URI has no host or does not parse;An explicitly typed name always wins. The PostgreSQL name is unchanged.
Tests: the helper (URI with and without port,
+srv, no host, no URI) and the e2e form scenarios assert the saved name contains the URI's host.Closes #1257
Test plan