QueryStreams
@rotorsoft/act-root / act/src / QueryStreams
Type Alias: QueryStreams
QueryStreams =
object
Defined in: libs/act/src/types/ports.ts:274
Filter options for Store.query_streams.
Mirrors the Query pattern used by Store.query — pass filters server-side to keep the cost low on large tables (e.g., dynamic reactions producing one subscription per aggregate).
What the store can filter: the columns it actually persists —
stream, source, blocked. Higher-level classification ("is this a
projection vs a reaction?", "is this a static or dynamic resolver?")
is an orchestrator concern; the streams table doesn't store kinds.
Layer that on top by joining results with Act's built-in registry.
Properties
after?
readonlyoptionalafter?:string
Defined in: libs/act/src/types/ports.ts:282
Keyset pagination cursor: returns only streams with
stream > after (lexicographic). Pass the last seen stream to fetch
the next page.
blocked?
readonlyoptionalblocked?:boolean
Defined in: libs/act/src/types/ports.ts:280
Restrict to blocked (true) or unblocked (false)
streams. Omit for all.
lane?
readonlyoptionallane?:string
Defined in: libs/act/src/types/ports.ts:281
Restrict to streams in this drain lane. Exact match.
limit?
readonlyoptionallimit?:number
Defined in: libs/act/src/types/ports.ts:283
Max rows to return (default: 100). A bound, applied
before a row is emitted: limit: 0 returns none. A non-negative integer: other values aren't validated, and adapters treat them differently.
source?
readonlyoptionalsource?:string
Defined in: libs/act/src/types/ports.ts:277
Source-stream filter. Same anchor semantics and
portable grammar as stream. Useful to isolate dynamic-reaction
subscriptions tied to a particular aggregate stream. Pass
source_exact: true for literal equality.
source_exact?
readonlyoptionalsource_exact?:boolean
Defined in: libs/act/src/types/ports.ts:278
Use exact match instead of pattern match for
source.
source_matches?
readonlyoptionalsource_matches?:ReadonlyArray<string>
Defined in: libs/act/src/types/ports.ts:279
Best-effort reverse-match narrowing: prefer
streams whose stored source pattern matches at least one of the
given names (i.e. name ~ source, the inverse of source above which
is source ~ pattern). A subscription with an absent or empty source
(no source constraint — it consumes from every stream) ALWAYS qualifies,
regardless of the names. For a caller that wants only the subscriptions
that could consume from a set of streams; the framework itself doesn't
use it. Callers must treat it as a hint, not an exact filter: a
store that can't express reverse-regex (e.g. an anchor-aware LIKE
approximation) MAY return a superset — typically by ignoring the filter
entirely — so callers that need exactness re-verify in process. Stores
that honor it server-side advertise source_matches in the TCK's
StoreCapabilities, which gates the narrowing-behavior tests;
correctness never depends on the flag, only the row count fetched.
stream?
readonlyoptionalstream?:string
Defined in: libs/act/src/types/ports.ts:275
Stream-name filter. Interpreted as a regex by
default — same anchor semantics across all stores (PG ~, SQLite
anchor-aware LIKE, InMemory JS RegExp). Anchors are caller-
controlled: ^foo for prefix, foo$ for suffix, ^foo$ for
whole-string match. A plain string foo is a substring match
(matches any stream containing foo). Pass stream_exact: true
for a fast literal-equality comparison that skips regex compilation.
Portable grammar: the subset guaranteed to match identically on
every adapter is ^ / $ anchors, . (any single character),
.* (any run of characters), and literal characters. Adapters
whose native engine compiles richer regex (PG POSIX, InMemory
RegExp) MAY accept more; an adapter that cannot express a pattern
exactly MUST throw ValidationError rather than silently
approximate — a silently-wrong match is the worst failure mode when
the filter drives reset / unblock. Pinned by the TCK's
stream-filter-grammar suite.
stream_exact?
readonlyoptionalstream_exact?:boolean
Defined in: libs/act/src/types/ports.ts:276
Treat stream as a literal string instead
of a regex.