0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-06-16 08:58:20 +02:00

ircd:Ⓜ️ Add event::fetch seekless ctor w/ selection.

This commit is contained in:
Jason Volk 2018-05-19 22:39:03 -07:00
parent 2b71ad8a04
commit 2f48b69102
2 changed files with 14 additions and 0 deletions

View file

@ -199,6 +199,7 @@ struct ircd::m::event::fetch
fetch(const id &, std::nothrow_t);
fetch(const id &, const keys::selection &);
fetch(const id &);
fetch(const keys::selection &);
fetch();
static bool event_id(const idx &, std::nothrow_t, const id::closure &);

View file

@ -1517,6 +1517,19 @@ ircd::m::event::fetch::fetch()
{
}
/// Seekless constructor.
ircd::m::event::fetch::fetch(const keys::selection &selection)
:row
{
*dbs::events, string_view{}, keys{selection}, cell
}
,valid
{
false
}
{
}
/// Seek to event_id and populate this event from database.
/// Throws if event not in database.
ircd::m::event::fetch::fetch(const event::id &event_id)