types.ServerValues

types.ServerValues(df, sql, title, tables, client, data_sources, current_table)

Session-specific reactive values and client returned by QueryChat.server().

Each session gets its own ServerValues to ensure proper isolation between concurrent sessions.

Attributes

Name Type Description
df Reactive Calc returning the current filtered data frame. With multiple tables, warns and defaults to the primary table; use .table('name').df().
sql Reactive Value for the current SQL query string. With multiple tables, warns and defaults to the primary table; use .table('name').sql.
title Reactive Value for the current title. With multiple tables, warns and defaults to the primary table; use .table('name').title.
tables Per-table reactive state dict. Keys are table names.
client Session chat client.
current_table str | None The name of the most recently queried table, or None if no query has been run yet. Call .current_table() to read reactively.

Methods

Name Description
current_table Return the name of the most recently queried table, or None (reactive).
table Get a per-table accessor with reactive state.
table_names Return the names of all registered tables.

current_table

types.ServerValues.current_table()

Return the name of the most recently queried table, or None (reactive).

table

types.ServerValues.table(name)

Get a per-table accessor with reactive state.

Parameters

Name Type Description Default
name str Table name. required

Returns

Name Type Description
TableAccessor Accessor with df(), sql(), title() backed by per-session state.

table_names

types.ServerValues.table_names()

Return the names of all registered tables.