Skip to content
@drupflare/spool v1.0.0 GitHub
    Preparing search index...

    Type Alias QueryPlan

    a read-only query over held datasets, declared on a route and written in JSON

    type QueryPlan = {
        from: string[];
        group?: { aggregates: Record<string, PlanAggregate>; by: string[] };
        join?: PlanJoin[];
        limit: number;
        pageSize: number;
        sort?: string[];
        where?: PlanCondition[];
    }
    Index
    from: string[]

    base fields the plan may read; the output row carries exactly these

    group?: { aggregates: Record<string, PlanAggregate>; by: string[] }
    join?: PlanJoin[]
    limit: number

    most result rows (groups or joined rows) the plan answers locally

    pageSize: number
    sort?: string[]

    fields the sort parameter may name; a leading minus in the URL sorts descending

    where?: PlanCondition[]

    conditions, all ANDed; a condition whose parameter is absent is skipped