mirror of
https://github.com/matrix-construct/construct
synced 2024-12-29 00:44:17 +01:00
ircd:Ⓜ️:dbs: Fix prefix related for event_refs column.
This commit is contained in:
parent
a63f23fc2d
commit
2586476a57
2 changed files with 6 additions and 7 deletions
|
@ -44,7 +44,7 @@ namespace ircd::m::dbs
|
|||
// Lowlevel util
|
||||
constexpr size_t EVENT_REFS_KEY_MAX_SIZE {sizeof(event::idx) + sizeof(event::idx)};
|
||||
string_view event_refs_key(const mutable_buffer &out, const event::idx &tgt, const event::idx &referer);
|
||||
std::pair<event::idx, event::idx> event_refs_key(const string_view &amalgam);
|
||||
std::tuple<event::idx> event_refs_key(const string_view &amalgam);
|
||||
|
||||
constexpr size_t ROOM_HEAD_KEY_MAX_SIZE {id::MAX_SIZE + 1 + id::MAX_SIZE};
|
||||
string_view room_head_key(const mutable_buffer &out, const id::room &, const id::event &);
|
||||
|
|
|
@ -1063,18 +1063,17 @@ ircd::m::dbs::event_refs_key(const mutable_buffer &out,
|
|||
};
|
||||
}
|
||||
|
||||
std::pair<ircd::m::event::idx, ircd::m::event::idx>
|
||||
std::tuple<ircd::m::event::idx>
|
||||
ircd::m::dbs::event_refs_key(const string_view &amalgam)
|
||||
{
|
||||
assert(size(amalgam) >= sizeof(event::idx) * 2);
|
||||
const event::idx *const &key
|
||||
const byte_view<event::idx> key
|
||||
{
|
||||
reinterpret_cast<const event::idx *>(data(amalgam))
|
||||
amalgam
|
||||
};
|
||||
|
||||
return
|
||||
{
|
||||
key[0], key[1]
|
||||
key
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -1115,7 +1114,7 @@ ircd::m::dbs::desc::events__event_refs
|
|||
{},
|
||||
|
||||
// prefix transform
|
||||
{},
|
||||
events__event_refs__pfx,
|
||||
|
||||
// drop column
|
||||
false,
|
||||
|
|
Loading…
Reference in a new issue