Add ParseFileURI and use it when dealing with file URIs (#1088)

* Add ParseFileURI and use it when dealing with file URIs

Fixes #1059

* Missing file

* Linting
This commit is contained in:
Kegsay 2020-06-04 11:18:08 +01:00 committed by GitHub
parent d4f9a4bb97
commit e7d1ac84c3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
17 changed files with 66 additions and 51 deletions

View file

@ -33,7 +33,7 @@ func NewDatabase(
}
switch uri.Scheme {
case "file":
return sqlite3.NewDatabase(uri.Path)
return sqlite3.NewDatabase(dataSourceName)
case "postgres":
return nil, fmt.Errorf("Cannot use postgres implementation")
default: