dendrite/roomserver/storage/cosmosdb/state_blob_seq.go
alexfca fd7f25479b
Upgrade Dendrite 0.5.0 support for CosmosDB (#15)
* - 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>
2021-09-10 16:04:17 +10:00

14 lines
367 B
Go

package cosmosdb
import (
"context"
"github.com/matrix-org/dendrite/internal/cosmosdbutil"
)
func GetNextStateBlockNID(s *stateBlockStatements, ctx context.Context) (int64, error) {
const docId = "stateblocknid_seq"
//1 insert start at 2
return cosmosdbutil.GetNextSequence(ctx, s.db.connection, s.db.cosmosConfig, s.db.databaseName, s.tableName, docId, 2)
}