Skip to content

Interface: ServerLiveOptions<T>

Defined in: server/src/live-select.ts:7

T

readonly executor: SqlExecutor

Defined in: server/src/live-select.ts:8


readonly optional dialect?: SqlDialect

Defined in: server/src/live-select.ts:9


readonly fetch: () => Promise<T>

Defined in: server/src/live-select.ts:16

Function that runs the query and returns fresh rows. Called after every detected change (or every pollIntervalMs if no change hook fires). Runs with no auth — this API is intended for admin dashboards that need cross-tenant visibility.

Promise<T>


readonly optional tables?: readonly string[]

Defined in: server/src/live-select.ts:22

User-table names whose change-log activity should trigger a refresh. Omit to react to every table. Filtering keeps unrelated writes from paying the fetch cost.


readonly optional pollIntervalMs?: number

Defined in: server/src/live-select.ts:28

Polling cadence in ms. The runner still polls at this interval even when the change log looks quiet, so callers get a heartbeat even in the absence of writes. Default: 1000 ms.


readonly onChange: (rows) => void

Defined in: server/src/live-select.ts:30

Called with the latest result whenever it changes.

T

void