Skip to main content
Version: v10.0.0

QueryExplanation

How the db serves a query, from query.explain()


Import
import { QueryExplanation } from "@hyper-fetch/db"

Preview​

type QueryExplanation = {
answeredLocally: boolean;
error?: Error;
kind: list | one | local | error;
loader?: number;
local: ExpressionNode[];
sent: SendableNode[];
syncs: { topic: string; type: (insert | update | delete | changes) }[];
}

Structure​

QueryExplanation
NameTypeDescription
answeredLocally
boolean

Whether rows the db already holds answer the query, with no request

error
Error
kind
list | one | local | error
loader
number

Index of the loader in the collection's chain

local
ExpressionNode[]

Conditions evaluated on the rows the db holds

sent
SendableNode[]

Conditions sent to the backend

syncs
{ topic: string; type: (insert | update | delete | changes) }[]

The syncs that keep the result live