Room version abstractions (#865)

* Rough first pass at adding room version abstractions

* Define newer room versions

* Update room version metadata

* Fix roomserver/versions

* Try to fix whitespace in roomsSchema
This commit is contained in:
Neil Alexander 2020-02-05 16:25:58 +00:00 committed by GitHub
parent 4da2630904
commit 880d8ae024
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 1201 additions and 967 deletions

View file

@ -697,6 +697,14 @@ func (d *Database) EventsFromIDs(ctx context.Context, eventIDs []string) ([]type
return d.Events(ctx, nids)
}
func (d *Database) GetRoomVersionForRoom(
ctx context.Context, roomNID types.RoomNID,
) (int64, error) {
return d.statements.selectRoomVersionForRoomNID(
ctx, nil, roomNID,
)
}
type transaction struct {
ctx context.Context
txn *sql.Tx