Remote / API

foldkit-remote/maintained

foldkit-remote/maintained: values over the rows of a loaded list, kept up to date from the rows that changed (#580).

Namespaces

Maintainedfoldkit-remote/maintained: a value over the rows of a loaded list (a total, a minimum, the rows themselves) kept up to date from the rows that changed…

Functions

classifyClassify a maintained definition (List or ListAggregate).
classifyOperationClassify a custom reduce fold over a @doeixd/metakit/operation Operation, as its keeper runs it: a change is folded in where it arrives only where…
coversWhether every row matching asked is guaranteed to be included in held (asked.where ⇒ held.where), checked over entity.schema via Abstract.checkGoal.
formatRescanLogFormat a development log line for a rescanning maintained value (returns undefined for Update).
makeOrderIndexBuild a sorted order index over entries, ordered by compare(a, b) with EntityKey tie-break for uniqueness.
makeReverseIndexBuild a reverse index mapping targetId -> Set<sourceKey> for O(1) join lookups.
markCurrentPromote an AsOfResult to Current once a fresh read settles.
maybeOrderIndexBuild an OrderIndex only when entries.length > threshold (default INDEX_THRESHOLD = 400).
maybeReverseIndexBuild a ReverseIndex only when links.length > threshold (default INDEX_THRESHOLD = 400).
rescanReportReturn every rescanning maintained value in entries with its reason and message.
restoreAsOfRestore a retained maintained value after reload/reconnect. Strips any extraneous cursor field, tags freshness as AsOf, and marks needsRefresh: true so the…
retainAsOfSnapshot a maintained value for offline persistence at revision. Intentionally carries only value and completeAsOf (never a server cursor).

Values

Classification
Freshness
INDEX_THRESHOLDRow count above which an order or reverse index is built (decision 22).

Interfaces

AsOfResult
ClassifyOptions
CoverageOptions
JoinDefinition
JoinedRowsLive reverse-indexed view of grouped rows: forTarget reads the maintained ReverseIndex for the latest Maintained.value read, so callers should not retain…
ListDefinitionThe counted rows in the loaded connection's order.
MaintainedValueA maintained value over every row the client has loaded for the list's query and input, as filtered is: not the rows that exist, and not the window the read…
MaintainedWhereWhich rows of the list count: those a registered query's body matches, for its input.
OrderEntry
OrderIndex
ReduceDefinition
ReduceOptionsWhat reduce reads the operation's claims under: Expr.RewritePolicy.verified(evidence) or trusted.
RescanReportEntry
RetainedAsOf
ReverseIndex

Types

AggregateValueWhat an aggregate gives: a number for sum and count, an Option for min and max, a boolean for every and any.
DefinitionWhat a maintained value keeps: a @doeixd/metakit/aggregates value, reduce, join, or list.
ListAggregateThe parts of a @doeixd/metakit/aggregates value a list's rows are folded with. Only functions of a row, so an aggregate over fewer fields than the list…
ValueOfWhat a definition gives over rows of type Row.