mirror of
https://github.com/matrix-construct/construct
synced 2025-01-03 19:34:29 +01:00
ircd:Ⓜ️:event::fetch: Eliminate the selected_only option; make unconditional.
This commit is contained in:
parent
af3fe14e6d
commit
51c5ffbb5e
2 changed files with 5 additions and 9 deletions
|
@ -114,11 +114,6 @@ struct ircd::m::event::fetch::opts
|
||||||
/// json query anyway.
|
/// json query anyway.
|
||||||
bool query_json_force {false};
|
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 event::keys &, const db::gopts & = {});
|
||||||
opts(const db::gopts &, const event::keys & = {});
|
opts(const db::gopts &, const event::keys & = {});
|
||||||
opts() = default;
|
opts() = default;
|
||||||
|
|
|
@ -1674,11 +1674,12 @@ ircd::m::event::fetch::assign_from_json(const opts &opts)
|
||||||
_json.val()
|
_json.val()
|
||||||
};
|
};
|
||||||
|
|
||||||
assert(!empty(source));
|
event =
|
||||||
event = opts.selected_only?
|
{
|
||||||
m::event{source, opts.keys}:
|
source, opts.keys
|
||||||
m::event{source};
|
};
|
||||||
|
|
||||||
|
assert(!empty(source));
|
||||||
assert(data(event.source) == data(source));
|
assert(data(event.source) == data(source));
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue