mirror of
https://github.com/matrix-construct/construct
synced 2025-04-12 13:01:46 +02:00
ircd:Ⓜ️:event::fetch: Add some assertions on the seek().
This commit is contained in:
parent
c43a0e49ab
commit
8b05ea9d39
1 changed files with 7 additions and 3 deletions
|
@ -1548,13 +1548,17 @@ ircd::m::seek(event::fetch &fetch,
|
|||
if(query_json)
|
||||
{
|
||||
if((fetch.valid = fetch._json.load(key, opts.gopts)))
|
||||
event = m::event
|
||||
{
|
||||
json::object{fetch._json.val()}, opts.keys
|
||||
const json::object source
|
||||
{
|
||||
fetch._json.val()
|
||||
};
|
||||
|
||||
if(fetch.valid)
|
||||
assert(fetch.valid);
|
||||
assert(!empty(source));
|
||||
event = m::event{source, opts.keys};
|
||||
return fetch.valid;
|
||||
}
|
||||
|
||||
// graceful fallback to row query if json query failed.
|
||||
assert(!fetch.valid);
|
||||
|
|
Loading…
Add table
Reference in a new issue