Commit graph

8 commits

Author SHA1 Message Date
Kegan Dougal 83b0a0c681 Share more code 2020-05-14 15:12:41 +01:00
Kegan Dougal 37fd22ef8d remove a few functions 2020-05-14 14:55:59 +01:00
Kegan Dougal d8050417e7 port over sqlite topology table 2020-05-14 14:47:28 +01:00
Kegan Dougal 170aecdd40 Revert "wip sqlite merges; database is locked errors to investigate and failing tests"
This reverts commit 26cbfc5b75.
2020-05-14 14:35:07 +01:00
Kegan Dougal 26cbfc5b75 wip sqlite merges; database is locked errors to investigate and failing tests 2020-05-14 13:09:27 +01:00
Kegan Dougal 08d0eda31c Refactor all postgres tables; start work on sqlite 2020-05-14 10:40:59 +01:00
Kegsay 9ed68a3125
Factor out account data and events table (#1031)
* Factor out account data

* Factor out events table and EDU cache

* linting

* fix npe
2020-05-14 09:53:55 +01:00
Kegsay a25d477cdb
Initial syncapi storage refactor to share pq/sqlite code (#1030)
* Initial syncapi storage refactor to share pq/sqlite code

This goes down a different route than https://github.com/matrix-org/dendrite/pull/985
which tried to even reduce the boilerplate of `ExecContext` etc. The previous pattern
fails badly when there are subtle differences in parameters and hence the shared
boilerplate to read from `QueryContext` breaks. Rather than attacking it at that level,
the main place where we want to reuse code is for the `syncserver.go` itself - the
database implementation which has lots of complex logic. So instead, this commit:
 - Makes `invites_table.go` an interface.
 - Makes `SyncServerDatasource` use that interface
 - This means some functions are now identical for pq/sqlite, so factor them out
   to a temporary `shared.Database` struct which will grow until it replaces all of
   `SyncServerDatasource`.

* Missing files
2020-05-13 17:28:42 +01:00