Neil Alexander
4e4fc400a2
Consolidate purge statements as they need to be prepared after other tables are created
2022-08-22 13:48:09 +01:00
Neil Alexander
b56011514b
Fix a query
2022-08-22 12:01:23 +01:00
Neil Alexander
d11c243599
More PostgreSQL purging
2022-08-22 11:46:44 +01:00
Till
6db08b2874
Add roomserver tests (2/?) ( #2445 )
...
* Add invite table tests; move variable declarations
* Add Membership table tests
* Move variable declarations
* Add PrevEvents table tests
* Add Published table test
* Add Redactions tests
Fix bug in SQLite markRedactionValidatedSQL
* PR comments, better readability for invite tests
2022-05-10 14:41:12 +02:00
Kegan Dougal
ed4097825b
Factor out StatementList to sqlutil
and use it in userapi
...
It helps with the boilerplate.
2021-07-28 18:30:04 +01:00
Neil Alexander
5ce1fe80de
State storage refactor ( #1839 )
...
* Hash-deduplicated state storage (and migrations) for PostgreSQL and SQLite
* Refactor droomserver database setup for migrations
* Fix conflict statements
* Update migration names
* Set a boundary for old to new block/snapshot IDs so we don't rewrite them more than once accidentally
* Create sequence if not exists
* Fix boundary queries
* Fix boundary queries
* Use Query
* Break out queries a bit
* More sequence tweaks
* Query parameters are not playing the game
* Injection escaping may not work for CREATE SEQUENCE after all
* Fix snapshot sequence name
* Use boundaried IDs in SQLite too
* Use IFNULL for SQLite
* Use COALESCE in PostgreSQL
* Review comments @Kegsay
2021-04-26 13:25:57 +01:00
Kegsay
ecd7accbad
Rehuffle where things are in the internal package ( #1122 )
...
renamed: internal/eventcontent.go -> internal/eventutil/eventcontent.go
renamed: internal/events.go -> internal/eventutil/events.go
renamed: internal/types.go -> internal/eventutil/types.go
renamed: internal/http/http.go -> internal/httputil/http.go
renamed: internal/httpapi.go -> internal/httputil/httpapi.go
renamed: internal/httpapi_test.go -> internal/httputil/httpapi_test.go
renamed: internal/httpapis/paths.go -> internal/httputil/paths.go
renamed: internal/routing.go -> internal/httputil/routing.go
renamed: internal/basecomponent/base.go -> internal/setup/base.go
renamed: internal/basecomponent/flags.go -> internal/setup/flags.go
renamed: internal/partition_offset_table.go -> internal/sqlutil/partition_offset_table.go
renamed: internal/postgres.go -> internal/sqlutil/postgres.go
renamed: internal/postgres_wasm.go -> internal/sqlutil/postgres_wasm.go
renamed: internal/sql.go -> internal/sqlutil/sql.go
2020-06-12 14:55:57 +01:00
Kegsay
a7f12bce79
Convert remaining roomserver tables ( #1065 )
...
* Convert invites table
* Convert membership table
* Factor out remaining functions except for *Updater structs
* Remove 'implements' comments from long-forgotten interfaces. Move those comments to storage.Database
2020-05-27 11:03:47 +01:00
Kegsay
c0c5d9452a
Convert room_aliases previous_events state_block and state_snapshot tables ( #1064 )
...
* Convert state_snapshot and state_block tables
* Convert room_aliases and previous_events tables
* Add missing table
2020-05-27 09:36:09 +01:00
Kegsay
24d8df664c
Fix #897 and shuffle directory around ( #1054 )
...
* Fix #897 and shuffle directory around
* Update find-lint
* goimports
Co-authored-by: Neil Alexander <neilalexander@users.noreply.github.com>
2020-05-21 14:40:13 +01:00
Neil Alexander
c28577ea25
Implement storage interfaces ( #841 )
...
* Implement interfaces for federationsender storage
* Implement interfaces for mediaapi storage
* Implement interfaces for publicroomsapi storage
* Implement interfaces for roomserver storage
* Implement interfaces for syncapi storage
* Implement interfaces for keydb storage
* common.PartitionStorer in publicroomsapi interface
* Update copyright notices
2020-01-03 14:07:05 +00:00