Merge branch 'master' into neilalexander/sqlite-roomserver

This commit is contained in:
Neil Alexander 2020-01-09 17:05:44 +00:00
commit 7a71a59dc7
8 changed files with 26 additions and 8 deletions

View file

@ -62,7 +62,9 @@ type Database interface {
func Open(dataSourceName string) (Database, error) {
uri, err := url.Parse(dataSourceName)
if err != nil {
return nil, err
// if the scheme doesn't match, fall back to postgres in case the config has
// postgres key=value connection strings
return postgres.Open(dataSourceName)
}
switch uri.Scheme {
case "postgres":