Skip to main content

query_result_to_json

Function query_result_to_json 

Source
pub fn query_result_to_json(
    keys: &[String],
    records: &[HaysonRecord],
    matched: usize,
    plan: &AccessPathSummary,
) -> Value
Expand description

The whole answer to Table.query: the keys of the page, in query order, the records themselves, how many records matched before offset/limit cut that page out of them, and the plan that found them — one document rather than a bare array, so the shim can rebuild the QueryResult the TS package already exposes without a second round trip for the plan.