Interface: ServerLiveOptions<T>
Interface: ServerLiveOptions<T>
Section titled “Interface: ServerLiveOptions<T>”Defined in: server/src/live-select.ts:7
Type Parameters
Section titled “Type Parameters”T
Properties
Section titled “Properties”executor
Section titled “executor”
readonlyexecutor:SqlExecutor
Defined in: server/src/live-select.ts:8
dialect?
Section titled “dialect?”
readonlyoptionaldialect?:SqlDialect
Defined in: server/src/live-select.ts:9
readonlyfetch: () =>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.
Returns
Section titled “Returns”Promise<T>
tables?
Section titled “tables?”
readonlyoptionaltables?: readonlystring[]
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.
pollIntervalMs?
Section titled “pollIntervalMs?”
readonlyoptionalpollIntervalMs?: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.
onChange
Section titled “onChange”
readonlyonChange: (rows) =>void
Defined in: server/src/live-select.ts:30
Called with the latest result whenever it changes.
Parameters
Section titled “Parameters”T
Returns
Section titled “Returns”void