- Update queries to all use PartitionKeys
- Remove the _sid from queries as the PK contains the Tenant
- Fix some bugs around empty values and ordering
Co-authored-by: alexf@example.com <alexf@example.com>
* - Make all PartitionKeys include the tablename
- Update specific PKs to be item specific
- Add validation to the PerformQueryXX methods
- Fix queries that fail validation
* - Revert the PK back to CollectionName as it already includes the TableName
Co-authored-by: alexf@example.com <alexf@example.com>
* - Create CosmosDocument as a base class
- Add CT and UT
- Refactor all tables to use the CosmosDocument
* - Add UpsertDocument method to perform updates in a generic way
- Add SetUpdateTime() to update the UT for updates
- Refactor it all
* - Add Performquery method
- Refactor appservice_events_table
* - Update naffka Topics and Messages to use the common pattern
* - Update keyserver to use the common pattern for collection and PK
* - Update mediaapi to use the common pattern for collection and pk
* - Update roomserver to use the common pattern for collectionname and pk
* - Update signingkeyserver to use the common pattern for collectionname and pk
* - Update userapi touse the common pattern for collectionname and pk
* - Update partitionOffset to use the common collectionname and pk
- Remove generic GetPartitionKey() method
Co-authored-by: alexf@example.com <alexf@example.com>
* - Create CosmosDocument as a base class
- Add CT and UT
- Refactor all tables to use the CosmosDocument
* - Add UpsertDocument method to perform updates in a generic way
- Add SetUpdateTime() to update the UT for updates
- Refactor it all
Co-authored-by: alexf@example.com <alexf@example.com>
- Fix membership Insert to ensure the OnConflict performs an Update if exists
- Fix type in the rooms bulkSelectRoomNIDsSQL
Co-authored-by: alexf@example.com <alexf@example.com>
* - Add CosmosDB back
- Add missing methods to blacklist_table.go
- Add missing methods to device_keys_table.go
- Add missing methods to events_table.go
- Add missing methods to membership_table.go
- Update state_block_table.go (due to reafctor SQL)
- Update state_snapshot_table.go (due to reafctor SQL)
- Add new key_backup_table.go
- Add new key_backup_version_table.go
- Code compiles but has runtime errors
* Message sending + receiving working
Rooms and DMs working
- Add CrossSigningKeys table
- Add CrossSigningSigs table
- Refactor DeviceKeys yable
- Fix OneTimeKeys
- Update the KeyServer storage.go to use a PartitionStorer instead of a specific SQL PartitionOffsetStatements
- Fix small issues from the previous commit
- Implement DeleteSendToDeviceMessages
Co-authored-by: alexf@example.com <alexf@example.com>
* Delete device keys/signatures from key server when deleting device from user API
* Move loop to within database transaction
* Don't fall over deleting no rows