Skip to main content
An address says where a verb acts. It is a value built from a table, and no address changes what a verb means.

Points

A point is one place: the fact of a table at a key, or at a unique field set.
A minted key is passed alone. A declared key with one field is passed alone, and one with several fields as an object. A unique field set is always an object. An application fact ID carries its issued relation and original allocation. An admitted sealed archive copy keeps that ID, and the destination catalog maps its relation to the local table. Keep IDs as opaque strings and use an ID field for a reference that travels with the fact. The destination’s archive configuration must also map any renamed target relation named by the ID field. A physical Ref carries an address bound to one table incarnation.

Selections

A selection is an ordered set of facts. A selection ranges over at most one field. A declared index must serve every selection; one no index serves is refused with the index to add (see Indexes).
The table itself is the selection of every fact: ctx.count(orders), ctx.page(orders, { size: 50, cursor }), orders.first(10), orders.atMost(500). .first(n) truncates: it is the top n, and the facts past it are not read. Use .atMost(n) when the code needs all of a set it expects to be small, so that a set that grew past n refuses instead of being cut short. Walk a large selection with ctx.page, and keep a sum or count over it as a declared total. On a protected table (labelled, erasable or with a lifetime), an index keeps only a token of its fields. A selection that fixes every field of an index by equality takes every verb. Any other selection over it, and a whole table with a declared key, is read only with ctx.list(selection.atMost(n)): .first(n), ctx.page and ctx.count of it refuse ProtectedShapeUnsupported, unless its index declares a reviewed store exposure.

Ranked selections

A ranked selection orders facts by relevance or distance, and is always bounded by .first(n). Each result is a hit: { fact, score }. A where before .near filters the ranking, and needs an index that lists the where fields followed by the ranked field.

Valid time

Series and timelines have valid time. A plain table has no valid time: .at and .over on its points are type errors. See Series and timelines.

Worlds

.in(world) reads a point or selection in another world: a version or a branch. Without it, an address is in the frame’s world, normally the head.
A version stays readable for the table’s history, or while a pin holds it. See History and lifetime.

Change logs

.changes is the change log of a table, a selection or a point, as a selection. Each change is { key, before, after, version }: the fact before and after it (either null), and the version that committed it. .since(version) keeps the changes after a version.
Finish a baseline or descending scan using the page’s next continuation. Save page.cursor in a t.changeCursor field to continue the same structural feed with .changes.since(cursor). The cursor carries delivery across closures. An admitting frame receives erased or expired. Other frames receive removed only for facts delivered to that cursor’s chain. Drop the id from the local copy for any of these changes. Starting from a plain version begins a fresh chain. A structural feed whose delivery inventory reaches its bound returns a null cursor. A change log is also a reaction’s source: mutation({ on: orders.changes }, …) runs once per change. See Functions.

Presence history

orders(key).presence is a minted fact’s presence history: each committed version, its instant, and the valid periods the fact was present in. It is bounded by .first(n), at most 64, and takes a half-open version range.
Each entry is { version, at, proposed, timeline }, where timeline lists { from, to, present }.

A family member’s partition

On a family table, every address is at the frame’s member. table.of(family.of(key)) addresses another member’s partition.

A task

A Task identifies a single sys.tasks/<id> point. ctx.get(task) reads its state, or returns null when the task is absent. See Effects.