Lime Web Components API Documentation - v7.2.0
    Preparing search index...

    Type Alias QueryResponse<Q>

    The shape of the response from executing a Query.

    When the query's responseFormat is known at compile time (defined inline or with satisfies Query), the objects and aggregates shapes are inferred from it. Otherwise it falls back to unknown.

    Aggregate values are typed by operator: COUNT is number, SUM and AVG are number | null, and MIN and MAX are number | string | null (a date or text column returns a string, and an empty result returns null). A GROUP column returns the grouped property's value (a string, number, boolean, or null).

    type QueryResponse<Q extends Query = Query> = {
        aggregates: Q["responseFormat"] extends { aggregates: infer A }
            ? {
                -readonly [G in keyof A]: {
                    -readonly [C in keyof A[G]]: A[G][C] extends { op: "COUNT" }
                        ? number
                        : A[G][C] extends { op: "GROUP" }
                            ? string | number | boolean | null
                            : A[G][C] extends { op: "SUM"
                            | "AVG" }
                                ? number | null
                                : number | string | null
                }[]
            }
            : unknown;
        objects: Q["responseFormat"] extends { object: infer O }
            ? { -readonly [K in keyof O]: unknown }[]
            : unknown[];
    }

    Type Parameters

    Index

    Properties

    Properties

    aggregates: Q["responseFormat"] extends { aggregates: infer A }
        ? {
            -readonly [G in keyof A]: {
                -readonly [C in keyof A[G]]: A[G][C] extends { op: "COUNT" }
                    ? number
                    : A[G][C] extends { op: "GROUP" }
                        ? string | number | boolean | null
                        : A[G][C] extends { op: "SUM"
                        | "AVG" }
                            ? number | null
                            : number | string | null
            }[]
        }
        : unknown
    objects: Q["responseFormat"] extends { object: infer O }
        ? { -readonly [K in keyof O]: unknown }[]
        : unknown[]