More SQLite (#871)

* SQLite support for appservice

* SQLite support for mediaapi

* Copyright notices

* SQLite for public rooms API (although with some slight differences in behaviour)

* Lazy match aliases, add TODOs
This commit is contained in:
Neil Alexander 2020-02-14 14:12:33 +00:00 committed by GitHub
parent 409fec2a48
commit 3dabf4d4ed
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
17 changed files with 1034 additions and 111 deletions

View file

@ -19,6 +19,7 @@ import (
"net/url"
"github.com/matrix-org/dendrite/mediaapi/storage/postgres"
"github.com/matrix-org/dendrite/mediaapi/storage/sqlite3"
"github.com/matrix-org/dendrite/mediaapi/types"
"github.com/matrix-org/gomatrixserverlib"
)
@ -40,6 +41,8 @@ func Open(dataSourceName string) (Database, error) {
switch uri.Scheme {
case "postgres":
return postgres.Open(dataSourceName)
case "file":
return sqlite3.Open(dataSourceName)
default:
return postgres.Open(dataSourceName)
}