Skip to content

Commit

Permalink
Add gel as a valid dsn scheme.
Browse files Browse the repository at this point in the history
  • Loading branch information
dnwpark committed Nov 28, 2024
1 parent 0b17d5c commit 40cb4fb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions internal/client/connutils.go
Original file line number Diff line number Diff line change
Expand Up @@ -1209,9 +1209,9 @@ func parseDSN(dsn string) (*url.URL, map[string]string, error) {
return nil, nil, fmt.Errorf("could not parse DSN %q: %w", dsn, err)
}

if uri.Scheme != "edgedb" {
if uri.Scheme != "edgedb" && uri.Scheme != "gel" {
return nil, nil, fmt.Errorf(
`scheme is expected to be "edgedb", got %q`, uri.Scheme)
`scheme is expected to be "gel", got %q`, uri.Scheme)
}

query, err := url.ParseQuery(uri.RawQuery)
Expand Down
2 changes: 1 addition & 1 deletion internal/client/connutils_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,7 @@ func TestConUtils(t *testing.T) {
expected: Result{
err: &configurationError{},
errMessage: "edgedb.ConfigurationError: " +
`invalid DSN: scheme is expected to be "edgedb", got "pq"`,
`invalid DSN: scheme is expected to be "gel", got "pq"`,
},
},
{
Expand Down

0 comments on commit 40cb4fb

Please sign in to comment.