Iskra API Reference
    Preparing search index...

    Interface ListOptions<T, F, O>

    interface ListOptions<T = Record<string, unknown>, F = unknown, O = unknown> {
        count?: "wrap" | "none";
        filters?: F;
        limit?: string | number | null;
        maxLimit?: number;
        offset?: string | number | null;
        orders?: O;
        page?: string | number | null;
        pageSize?: string | number | null;
        params?: Readonly<Record<string, unknown>>;
        query?: (filters: F, orders: O | null) => ListQuery;
        rows?: RowsOption<T>;
        sql?: string;
        totalFilters?: F;
    }

    Type Parameters

    • T = Record<string, unknown>
    • F = unknown
    • O = unknown
    Index
    count?: "wrap" | "none"

    'wrap' (default) counts with SELECT COUNT(*) FROM (…); 'none' does not count.

    filters?: F
    limit?: string | number | null
    maxLimit?: number

    The most rows a request may ask for (a page size or limit, "all" included).

    offset?: string | number | null

    Rows to skip and to return (DataTables' start and length); limit null or -1 returns them all.

    orders?: O
    page?: string | number | null

    Or a 1-based page and its size (see pageParams); strings from a query string work.

    pageSize?: string | number | null
    params?: Readonly<Record<string, unknown>>
    query?: (filters: F, orders: O | null) => ListQuery

    …or a function that builds it from filters and orders (the rows' query gets the orders; the counts get null, so they need no ORDER BY).

    rows?: RowsOption<T>

    How each row is decoded: a rowSpec() or a Standard Schema.

    sql?: string

    The rows to list: a SELECT with its params by name (with its ORDER BY)…

    totalFilters?: F

    With query: the filters total counts with (the ones that always apply, such as the user's own records), so filtered counts the request's filters and total the rows before them, as DataTables' recordsTotal/recordsFiltered. Without it total equals filtered.