Expand description
Queries relating to account data
§Example for tags
Content of a room_account_data row to store room tags:
| user_id | room_id | data_type | data |
|---|---|---|---|
| 1 | !kZrfCE0UDTT3PjUosE:localhost:44199 | m.tag | {"tags": {"u.valid.ordered.tag": {"order": 0.3}}} |
A Matrix client requesting its tag would receive:
{
"tags": {
"u.valid.ordered.tag": {
"order": 0.3
}
}
}Which corresponds to the following m.tag Matrix event:
{
"content": {
"tags": {
"u.valid.ordered.tag": {
"order": 0.3
}
}
},
"type": "m.tag"
}Structs§
- Sync
Global Account Data Event - Used to query global account data events, along their stream ID.
- Sync
Room Account Data Event - Used to query room account data events along their room ID.
Traits§
- Account
Data Lock - Extension trait to acquire a per-user advisory lock for account data writes, held for the duration of the current transaction.
- Account
Data Queries - Queries relating to account data
Functions§
- advance_
account_ 🔒data_ sequence - Advances
account_data_streamidsso its last value coversstream_id, never moving it backwards. Called by the account-data importers after they insert a row carrying a preserved (sequence-bypassing) stream_id, so the nextnextvalcannot hand out an id that already exists.