0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-11-25 16:22:35 +01:00

ircd:Ⓜ️:events: Improve header comments.

ircd:Ⓜ️:dbs: Fix typos.
This commit is contained in:
Jason Volk 2019-08-13 00:48:58 -07:00
parent 94354e2d63
commit ea4d74967b
2 changed files with 14 additions and 6 deletions

View file

@ -21,20 +21,28 @@ namespace ircd::m::events
using closure_sender_name_bool = std::function<bool (const id::user &)>;
using closure_origin_name_bool = std::function<bool (const string_view &)>;
// Iterate types starting with some prefix, or all types.
bool for_each_type(const closure_type_name_bool &);
bool for_each_type(const string_view &prefix, const closure_type_name_bool &);
bool for_each_sender(const closure_sender_name_bool &);
bool for_each_sender(const string_view &hostlb, const closure_sender_name_bool &);
bool for_each_origin(const closure_origin_name_bool &);
bool for_each_origin(const string_view &prefix, const closure_origin_name_bool &);
// Iterate servers starting at the hostname equal to or greater than provided
bool for_each_origin(const closure_origin_name_bool &);
bool for_each_origin(const string_view &hostlb, const closure_origin_name_bool &);
// Iterate senders of events (users).
bool for_each_sender(const closure_sender_name_bool &);
bool for_each_sender(const string_view &key, const closure_sender_name_bool &);
// Iterate event indexes matching the argument
bool for_each_in_type(const string_view &, const closure_type_bool &);
bool for_each_in_sender(const id::user &, const closure_sender_bool &);
bool for_each_in_origin(const string_view &, const closure_sender_bool &);
// Iterate viable event indexes in a range
bool for_each(const range &, const event::closure_idx_bool &);
bool for_each(const range &, const event_filter &, const event::closure_idx_bool &);
// Iterate events in an index range
bool for_each(const range &, const closure_bool &);
bool for_each(const range &, const event_filter &, const closure_bool &);

View file

@ -2202,11 +2202,11 @@ ircd::m::dbs::desc::events__event_sender
origin | localpart, event_idx => --
The senders of events are indexes by this column. This allows for all
The senders of events are indexed by this column. This allows for all
events from a sender to be iterated. Additionally, all events from a
server and all known servers can be iterated from this column.
They key is made from a user mxid and an event_id, where the mxid is
The key is made from a user mxid and an event_id, where the mxid is
part-swapped so the origin comes first, and the @localpart comes after.
Lookups can be performed for an origin or a full user_mxid.