SessionIdSymbol
constSessionIdSymbol: uniquesymbol
Defined in: packages/@livestore/common/dist/session-id-symbol.d.ts:24
Can be used in queries to refer to the current session id. Will be replaced with the actual session id at runtime.
In client document table:
const uiState = State.SQLite.clientDocument({ name: 'ui_state', schema: Schema.Struct({ theme: Schema.Literals(['dark', 'light', 'system']), user: Schema.String, showToolbar: Schema.Boolean, }), default: { value: defaultFrontendState, id: SessionIdSymbol },})Or in a client document query:
const query$ = queryDb(tables.uiState.get(SessionIdSymbol))