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

    Type Alias QuerySchema

    The query strings a public route answers from the collection it holds. list names the key of the loaded data that holds the whole collection, an array of flat objects. A parameter named in filter keeps the items whose field of the same name equals it, and a repeated one matches any of its values. sort lists the fields the sort parameter may name (-name sorts descending), and pageSize turns on the 1-based page parameter.

    type QuerySchema = {
        dataset?: string;
        filter?: Record<string, QueryFilterType>;
        key?: string;
        list: string;
        pageSize?: number;
        plan?: QueryPlan;
        sort?: readonly string[];
    }
    Index
    dataset?: string

    Name of a dataset the device holds. The rows it holds are the collection, in ascending key order, so the route's data carries no list and no proof. Exclusive with key.

    filter?: Record<string, QueryFilterType>

    parameters that filter items, by field name, with how each is read

    key?: string

    field of each item that holds its dataset key; a list with a set proof needs it

    list: string

    key of the loaded data that holds the collection

    pageSize?: number

    items per page; turns on the page parameter

    plan?: QueryPlan

    A read-only plan over the held dataset: joins, conditions, groups and aggregates. Requires dataset; list names the key the result rows go under. See QueryPlan.

    sort?: readonly string[]

    fields the sort parameter may name; a leading minus reverses the order