0
0
Fork 0
mirror of https://github.com/matrix-org/dendrite synced 2024-12-14 21:33:51 +01:00
dendrite/syncapi/storage
Ashley Nelson c1e16fd41e
Fix fragility of selectEventsWithEventIDsSQL queries (#2757)
This fixes a temporary workaround with the `selectEventsWithEventIDsSQL`
queries where fields need to be artificially added to the queries so the
row results match the format of the `syncapi_output_room_events` table.
I made similar functions that accept row results from the
`syncapi_current_room_state` table and convert them into StreamEvents
without the fields that are specific to output room events.

There is also a unit test in the first commit to ensure the resulting
behavior doesn't change from the modified queries and functions.

Fixes #601.

### Pull Request Checklist

<!-- Please read docs/CONTRIBUTING.md before submitting your pull
request -->

* [x] I have added tests for PR _or_ I have justified why this PR
doesn't need tests.
* [x] Pull request includes a [sign
off](https://github.com/matrix-org/dendrite/blob/main/docs/CONTRIBUTING.md#sign-off)

Signed-off-by: `Ashley Nelson <fant@shley.email>`

Co-authored-by: Neil Alexander <neilalexander@users.noreply.github.com>
2022-10-03 11:57:21 +01:00
..
postgres Fix fragility of selectEventsWithEventIDsSQL queries (#2757) 2022-10-03 11:57:21 +01:00
shared Modify sync transaction behaviour (#2758) 2022-10-03 11:38:20 +01:00
sqlite3 Fix fragility of selectEventsWithEventIDsSQL queries (#2757) 2022-10-03 11:57:21 +01:00
tables Fix fragility of selectEventsWithEventIDsSQL queries (#2757) 2022-10-03 11:57:21 +01:00
interface.go Modify sync transaction behaviour (#2758) 2022-10-03 11:38:20 +01:00
storage.go Global database connection pool (for monolith mode) (#2411) 2022-05-03 16:35:06 +01:00
storage_test.go Transactional isolation for /sync (#2745) 2022-09-30 12:48:10 +01:00
storage_wasm.go Global database connection pool (for monolith mode) (#2411) 2022-05-03 16:35:06 +01:00