Commit 96c1c1d
feat(pkg-py): add multi-table support
Add the ability to register multiple tables with a QueryChat instance,
enabling cross-table queries and per-table state management.
- **Storage**: Change from single `_data_source` to `_data_sources` dict
- **API**: Add `table_names()`, `table()`, `add_table()`, `remove_table()` methods
- **TableAccessor**: New class for per-table access (`qc.table("name").df()`)
- **Backwards compatible**: Single-table usage works unchanged
- `update_dashboard` and `reset_dashboard` now include table name parameter
- `tool_query` supports querying across multiple tables
- Updated tool prompts to guide LLM on multi-table operations
- Schema section now includes all registered tables
- Added relationship hints for JOINs
- Table descriptions can be provided for LLM context
All frameworks (Shiny, Dash, Streamlit, Gradio) updated to work with
the new dict-based storage while maintaining single-table behavior.
- Added 22 new tests for multi-table functionality
- Updated existing tests for new internal structure
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>1 parent f3a4360 commit 96c1c1d
File tree
21 files changed
+3297
-72
lines changed- docs/plans
- pkg-py
- examples
- src/querychat
- prompts
- tests
21 files changed
+3297
-72
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
6 | 7 | | |
7 | 8 | | |
8 | 9 | | |
| |||
0 commit comments