Readonly~@dxos/echo/Query from all accessible spaces.
Example:
Query.select(Filter.type(Person)).from('all-accessible-spaces');
Optionaloptions: { includeFeeds?: boolean }OptionalincludeFeeds?: boolean[false] - Whether to include feeds in the query. Default is to query from automerge documents only.
Query from one or more raw scopes.
Use the Scope constructors rather than raw tagged objects:
Query.select(Filter.type(Type.Type)).from(Scope.space(), Scope.registry());
Readonly_tag: "feed"Optional Readonlybranches?: "all" | readonly (null | string)[]Restricts the read to items that are members of these branches: a branch id, or null for the
main branch. Absent reads the main branch only, so a private branch never reaches a reader that
did not ask for it; 'all' reads every branch.
ReadonlyfeedUri: stringOptional Readonlywalk?: { branch?: null | string; forks?: boolean }Reads the feed as a walk along the path from the root branch to branch (null or absent: the root
branch, or on a backward walk the branch of the cursor), in local order, each item once at its latest
block on the path. 'all' walks every branch of the feed in local order. forks also gives the base
item of each branch that forks at a block the walk gives.
Query from a raw scope or array of scopes.
Readonly_tag: "feed"Optional Readonlybranches?: "all" | readonly (null | string)[]Restricts the read to items that are members of these branches: a branch id, or null for the
main branch. Absent reads the main branch only, so a private branch never reaches a reader that
did not ask for it; 'all' reads every branch.
ReadonlyfeedUri: stringOptional Readonlywalk?: { branch?: null | string; forks?: boolean }Reads the feed as a walk along the path from the root branch to branch (null or absent: the root
branch, or on a backward walk the branch of the cursor), in local order, each item once at its latest
block on the path. 'all' walks every branch of the feed in local order. forks also gives the base
item of each branch that forks at a block the walk gives.
Readonly_tag: "feed"Optional Readonlybranches?: "all" | readonly (null | string)[]Restricts the read to items that are members of these branches: a branch id, or null for the
main branch. Absent reads the main branch only, so a private branch never reaches a reader that
did not ask for it; 'all' reads every branch.
ReadonlyfeedUri: stringOptional Readonlywalk?: { branch?: null | string; forks?: boolean }Reads the feed as a walk along the path from the root branch to branch (null or absent: the root
branch, or on a backward walk the branch of the cursor), in local order, each item once at its latest
block on the path. 'all' walks every branch of the feed in local order. forks also gives the base
item of each branch that forks at a block the walk gives.
Order the query results. Orders are specified in priority order. The first order will be applied first, etc.
Order.property orders by the current result shape's fields, so it works both before and after
an aggregate: before, by member (row) properties; after, by the flat record's fields
(any group or aggregate field — e.g. Order.property('lastMessageAt') reorders the groups by
that aggregate).
Query for the ordered results.
Project the query's results to a single scalar property, for use as a membership set in
Filter.in(query.project('col')) — an uncorrelated col IN (SELECT property FROM ...)
semi-join. The subquery is resolved once at execution time. A projection is a terminal
value, not a Query, so it cannot be chained further.
Property path to project.
Find objects referencing this object.
Schema of the referencing object. If not provided, matches any type.
Property path inside the referencing object that is a reference. If not provided, matches any property.
Query for the referencing objects.
Find relations where this object is the source.
Query for the relation objects.
Find relations where this object is the target.
Query for the relation objects.
Aggregate the query results into flat records. Aggregate.group entries partition the results into contiguous groups (one record each), keyed by the record field the group is named after; with no
groupentries the entire input aggregates into a single record. Each declared aggregate becomes a top-level field and can be ordered by with a following orderBy using Order.property.Groups are ordered by the first occurrence of their key in the incoming stream, so a preceding
orderBycontrols group order in the absence of a following one. Aggregate.items's ownorderoption is a separate, explicit per-group member ordering — pass it there rather than relying on a precedingorderBy, whose only well-defined job onceaggregatefollows is establishing initial group order. For example, message threads ordered by their most recent message, each retaining up to 20 members newest-first:Must be the last data-selecting clause in the chain — only
from/options/orderBy/limit/skipmay follow.