mirror of
https://github.com/matrix-org/dendrite
synced 2024-12-18 07:43:42 +01:00
a25d477cdb
* 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 |
||
---|---|---|
.. | ||
account_data_table.go | ||
current_room_state_table.go | ||
invites_table.go | ||
output_room_events_table.go | ||
output_room_events_topology_table.go | ||
stream_id_table.go | ||
syncserver.go |