mirror of
https://github.com/hoernschen/dendrite.git
synced 2025-08-02 14:12:47 +00:00
Finish merging syncserver.go (#1033)
* Refactor all postgres tables; start work on sqlite * wip sqlite merges; database is locked errors to investigate and failing tests * Revert "wip sqlite merges; database is locked errors to investigate and failing tests" This reverts commit 26cbfc5b75ae2dc4fb31a838b917aa39d758f162. * convert current room state table * port over sqlite topology table * remove a few functions * remove more functions * Share more code * factor out completesync and a bit more * Remove remaining code
This commit is contained in:
parent
640a0265df
commit
1b34130a5b
14 changed files with 1284 additions and 2140 deletions
|
@ -28,14 +28,14 @@ import (
|
|||
func NewSyncServerDatasource(dataSourceName string, dbProperties common.DbProperties) (Database, error) {
|
||||
uri, err := url.Parse(dataSourceName)
|
||||
if err != nil {
|
||||
return postgres.NewSyncServerDatasource(dataSourceName, dbProperties)
|
||||
return postgres.NewDatabase(dataSourceName, dbProperties)
|
||||
}
|
||||
switch uri.Scheme {
|
||||
case "postgres":
|
||||
return postgres.NewSyncServerDatasource(dataSourceName, dbProperties)
|
||||
return postgres.NewDatabase(dataSourceName, dbProperties)
|
||||
case "file":
|
||||
return sqlite3.NewSyncServerDatasource(dataSourceName)
|
||||
return sqlite3.NewDatabase(dataSourceName)
|
||||
default:
|
||||
return postgres.NewSyncServerDatasource(dataSourceName, dbProperties)
|
||||
return postgres.NewDatabase(dataSourceName, dbProperties)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue