View as Markdown

API reference: @salmonui/core/data

DataSourceRequestinterface

import type { DataSourceRequest } from '@salmonui/core/data';
interface DataSourceRequest {
    readonly version: number;
    readonly query: DataQuery;
    readonly range?: {
        readonly start: number;
        readonly end: number;
    };
    readonly cursor?: string | null;
    readonly groupPath?: readonly GroupPathSegment[];
    readonly parentRowId?: RowId | null;
    readonly facet?: DataSourceFacetRequest;
    readonly signal: AbortSignalLike;
}
DataSourceRequest members (8)
NameSignatureDescription
versionreadonly version: number;
queryreadonly query: DataQuery;
rangeoptionalreadonly range?: { readonly start: number; readonly end: number; };
cursoroptionalreadonly cursor?: string | null;
groupPathoptionalreadonly groupPath?: readonly GroupPathSegment[];

Lazy group load: [] loads the root group level; a non-empty path loads that group's children. Absent for plain reads.

parentRowIdoptionalreadonly parentRowId?: RowId | null;

Tree read (tree mode over a remote source, createRemoteTree): null reads the root level, a row id reads that row's children. Sources answer with TreeRowEnvelope-shaped items ({ kind: 'tree', row, parentId, hasChildren, childCount?, depth?, children? }). Absent for plain reads.

facetoptionalreadonly facet?: DataSourceFacetRequest;

Facet read: distinct values of a column with counts over the rows passing search and every other column's filter, for remote checklist and Excel filters. Sources answer with facet.

signalreadonly signal: AbortSignalLike;