Expand description
Named read-only SQL queries exposed via the save_query / delete_query
tools and the hyper://queries/{name}/definition +
hyper://queries/{name}/result resources.
Two SavedQueryStore implementations:
SessionStore— in-memoryHashMapbehind aMutex. Used for ephemeral servers (no--workspace) where persistence across restarts is meaningless because the whole.hyperfile is thrown away.WorkspaceStore— backs onto a dedicated meta-table_hyperdb_saved_queriesinside the Hyper workspace. Chosen when a--workspacepath is configured so saved queries survive restarts alongside the data they query.
The server picks a store variant in HyperMcpServer::new and hands it
to tool handlers through Arc<dyn SavedQueryStore>. Both variants share
the same async-free API so call sites don’t have to care which is in
use.
Structs§
- Saved
Query - A named SQL query stored in the workspace.
- Session
Store - In-memory
SavedQueryStorefor ephemeral workspaces. Entries live in aMutex<HashMap>and vanish when the server process exits. - Workspace
Store - Persistent
SavedQueryStorebacked by the_hyperdb_saved_queriesmeta-table inside the.hyperworkspace. Rows round-trip through SQL parameter binding so saved queries containing quotes or backslashes are handled safely.
Constants§
- SAVED_
QUERIES_ TABLE - The meta-table used by
WorkspaceStoreto persist named queries inside the.hyperworkspace. The underscore prefix is a convention for “HyperDBinternal” — users shouldn’t query or mutate it directly.
Traits§
- Saved
Query Store - CRUD interface shared by both storage backends.
Functions§
- build_
store - Build the right store for a given workspace mode.