QueryStreams
@rotorsoft/act-root / act/src / QueryStreams
Type Alias: QueryStreams
QueryStreams =
object
Defined in: libs/act/src/types/ports.ts:212
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:220
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:218
Restrict to blocked (true) or unblocked (false)
streams. Omit for all.
lane?โ
readonlyoptionallane?:string
Defined in: libs/act/src/types/ports.ts:219
Restrict to streams in this drain lane (ACT-1103). Exact match.
limit?โ
readonlyoptionallimit?:number
Defined in: libs/act/src/types/ports.ts:221
Max rows to return (default: 100).
source?โ
readonlyoptionalsource?:string
Defined in: libs/act/src/types/ports.ts:215
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:216
Use exact match instead of pattern match for
source.
source_matches?โ
readonlyoptionalsource_matches?:ReadonlyArray<string>
Defined in: libs/act/src/types/ports.ts:217
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. Used by the
close-cycle safety probe to fetch only the subscriptions that could
consume from a set of close-target streams instead of scanning the
whole subscriptions table. 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 (the probe already does). 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:213
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:214
Treat stream as a literal string instead
of a regex.