0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-12-29 00:44:17 +01:00

ircd:Ⓜ️:event::fetch: Eliminate the selected_only option; make unconditional.

This commit is contained in:
Jason Volk 2019-01-18 13:07:13 -08:00
parent af3fe14e6d
commit 51c5ffbb5e
2 changed files with 5 additions and 9 deletions

View file

@ -114,11 +114,6 @@ struct ircd::m::event::fetch::opts
/// json query anyway.
bool query_json_force {false};
/// Whether to enforce the keys populated with values are tight to those
/// keys specified here. This is naturally true for row queries anyway,
/// but json queries may have more data than is being sought.
bool selected_only {true};
opts(const event::keys &, const db::gopts & = {});
opts(const db::gopts &, const event::keys & = {});
opts() = default;

View file

@ -1674,11 +1674,12 @@ ircd::m::event::fetch::assign_from_json(const opts &opts)
_json.val()
};
assert(!empty(source));
event = opts.selected_only?
m::event{source, opts.keys}:
m::event{source};
event =
{
source, opts.keys
};
assert(!empty(source));
assert(data(event.source) == data(source));
return true;
}