Skip to main content

Crate arminius_lib_db_account_data

Crate arminius_lib_db_account_data 

Source
Expand description

Queries relating to account data

§Example for tags

Content of a room_account_data row to store room tags:

user_idroom_iddata_typedata
1!kZrfCE0UDTT3PjUosE:localhost:44199m.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§

SyncGlobalAccountDataEvent
Used to query global account data events, along their stream ID.
SyncRoomAccountDataEvent
Used to query room account data events along their room ID.

Traits§

AccountDataLock
Extension trait to acquire a per-user advisory lock for account data writes, held for the duration of the current transaction.
AccountDataQueries
Queries relating to account data

Functions§

advance_account_data_sequence 🔒
Advances account_data_streamids so its last value covers stream_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 next nextval cannot hand out an id that already exists.