Skip to content

LiveQueryDiagnostics

Defined in: packages/client/src/worker/live-query-manager.ts:118

A structured-clone-safe, per-entry diagnostics record (ADR-0040 decision 5). It carries ONLY opaque fingerprint digests and counts/timings — NEVER SQL text, bound param values, or result-row values (those live only in the fingerprint’s private key, which is deliberately absent here). Safe to cross the bridge and surface in support tooling.

createdAt: number

Defined in: packages/client/src/worker/live-query-manager.ts:136

Monotonic stamp (ms) when the entry was created.


dedupHits: number

Defined in: packages/client/src/worker/live-query-manager.ts:134

How many subscribes JOINED this entry rather than creating it (active-joins + retained rejoins).


digest: string

Defined in: packages/client/src/worker/live-query-manager.ts:120

The opaque fingerprint digest (a short hash — see live-query-fingerprint.ts). NEVER the full key.


lastUsedAt: number | null

Defined in: packages/client/src/worker/live-query-manager.ts:142

Monotonic stamp (ms) of the last transition to zero subscribers, or null if never retained.


refresh: object

Defined in: packages/client/src/worker/live-query-manager.ts:140

Refresh timings for the shared registration (the hydration-chain / force refreshes).

count: number

lastMs: number | null

maxMs: number

totalMs: number


retained: boolean

Defined in: packages/client/src/worker/live-query-manager.ts:132

Whether this is a zero-subscriber entry currently kept alive (ADR-0040 decision 4).


retainedSinceMs: number | null

Defined in: packages/client/src/worker/live-query-manager.ts:144

How long (ms) the entry has been retained (now − lastUsedAt), or null when not retained.


rowCount: number

Defined in: packages/client/src/worker/live-query-manager.ts:130

Rows currently held in the shared diff state.


scopeCount: number

Defined in: packages/client/src/worker/live-query-manager.ts:128

Distinct subscription scopes on this entry. The worker passes one scope per bridge port, so in WORKER mode this is the number of distinct tabs on the query; the in-process client passes none, so it stays 1 while any subscriber is attached (0 while retained).


setupMs: number | null

Defined in: packages/client/src/worker/live-query-manager.ts:138

Time (ms) the registration setup took, or null until setup completes.


subscriberCount: number

Defined in: packages/client/src/worker/live-query-manager.ts:122

Current subscriber count (0 while retained).


teardownPending: boolean

Defined in: packages/client/src/worker/live-query-manager.ts:146

A teardown is in flight (the entry is unsubscribing from PGlite).