View as Markdown

API reference

@salmonui/data/json

88 exported symbols: 22 functions, 5 classes, 44 interfaces, 16 types and 1 constant. Each name links its page with the signature, docs and members.

import { … } from '@salmonui/data/json';

Functions

  • createBatchingFetchTransportBatching HTTP transport: same-tick requests share one POST.
  • createBatchingTransportMultiplexes every request issued in the same tick into one { v: 1, batch: [...] } call (lazy group children, facets, prefetch). A consumer that aborts is rejec…
  • createFetchTransportOne HTTP request per protocol request.
  • createJsonDataSource
  • createJsonPivotSourceRemote pivot source over the Salmon UI JSON protocol.
  • decodeTuplesBrings response tuples into the client's field order and expands dictionary-encoded cells. Works in place on the freshly parsed arrays: when the server already…
  • encodeRowsEncodes object rows as tuples (+ dictionaries); dates become epoch ms.
  • fieldIndexIndex of each field in the tuple header.
  • isRetryableErrorDefault retry predicate: network failures, 408, 429, and 5xx. Never aborts, 4xx, or protocol errors.
  • isWirePivotRequest
  • isWireWriteRequest
  • normalizeFilterOperatorCanonical built-in operator name, or null for a custom operator (sent verbatim).
  • objectToTupleInverse of tuplesToObjects for one row (writes).
  • serializeDataGridQueryDeterministic query serialization; identical to serializeDataGridQuery of @salmonui/data-grid/engine.
  • structuralQueryKeyQuery identity without paging and expansion: cursor chains and infinite blocks are cached under it.
  • toWherePredicateTop level: conditions on the same column fold left to right by their predicate; columns and groups are ANDed (Data Grid engine filter semantics).
  • toWirePivotModelThe model as it travels: rejects client-only aggregators, drops formats and conditional formats, omits defaults. Throws ProtocolError with code pivot/unsupport…
  • toWireQueryDataQuery to wire query. Paging is supplied by the caller (offset, cursor, or block).
  • tupleColumnsReturns column definitions whose field reads a tuple slot: valueGetter is row => row[i] and valueSetter copies the tuple once. The id defaults to the field so…
  • tupleRowIdgetRowId for tuple rows: the key slot as a string.
  • tuplesToObjectsMaterializes tuples as objects (object row mode). One allocation per row.
  • wirePivotModelKeyCanonical JSON of the wire model: equal models give equal bodies and cache keys.

Classes

Interfaces

Types

Constants