Skip to main content

Module keys

Module keys 

Source
Expand description

Storage keys (packages/zero-client/src/client/keys.ts) and the names of synthetic aggregate tables.

Modules§

aggregate_columns
The columns of an aggregate’s rows.

Structs§

InvalidPrimaryKeyValue
A primary key column whose value isn’t a string, number, or boolean.

Constants§

AGGREGATES_PREFIX
Synced aggregate rows live outside e/, which a client from before them loads into its schema’s tables: both can share a database.
AGGREGATE_TABLE_PREFIX
The prefix of every synthetic aggregate table’s name.
DESIRED_QUERIES_PREFIX
ENTITIES_PREFIX
GOT_QUERIES_PREFIX
MUTATIONS_PREFIX
ROW_VERSION_COLUMN
The row-version column the server stamps on synced rows; not part of an aggregate row’s key.

Functions§

aggregate_row_key
aggregateRowKey: a/, the table name without its aggregate:, and the row’s key, from aggregate_row_key_columns. A put’s full row, a del’s key, and an optimistic delta all give the same key.
aggregate_row_key_columns
aggregateRowKeyColumns: _0_key for a top-level aggregate’s or a grouped query’s row, and otherwise every column but the payload and the row version, sorted by UTF-16 code unit. The table name decides, not the row.
desired_queries_key
got_queries_key
is_aggregate_table_name
isAggregateTableName: a synthetic aggregate table, of any kind.
is_keyed_aggregate_table_name
isKeyedAggregateTableName: a table whose rows _0_key alone keys: a top-level aggregate’s or a grouped query’s.
is_top_level_aggregate_table_name
isTopLevelAggregateTableName: aggregate:<queryID>, with no further :, unlike a relationship aggregate’s or a grouped query’s.
js_string
JS String(v) for a scalar.
mutation_response_key
primary_key_string
toPrimaryKeyString: e/<table>/<id>. A single-column key is the value as JS String() prints it; a compound key is the decimal h128 of the JSON array of its values.
source_name
sourceNameFromKey: the source of an e/ or a/ row key. An a/ key leaves out the aggregate: of the table’s name.
valita_display
toDisplay in valita.ts: how its messages show a value.