You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would like to suggest an improvement to how queries are organized. I propose introducing an additional Database-Specific Query Store ( like in navicat).
This hybrid approach gives developers the best of both worlds:
Keep Global Queries for server-wide administration, utility scripts, or cross-database queries.
Have Database-Scoped Queries for scripts that strictly belong to a specific database's schema.
2. Proposed UI/UX Structure
Database Level (New):
Visual Representation:
▼ Connection: My_Server
▼ Database: db_orders
▼ Queries (New - Scoped only to db_orders)
- calculate_monthly_revenue
- get_failed_orders
▼ Database: db_users
▼ Queries (New - Scoped only to db_users)
- find_user_by_email
- reset_user_password
3. How it Works (Under the Hood)
Saving a Query: When saving a query tab, the user can choose whether to save it globally or bind it to the currently active database (e.g., via a simple checkbox/toggle or path selector in the save dialog).
Connection & Database Binding (Auto-Switch): Each saved query in the database store is strictly bound to its specific connection and database. When a user opens a saved query from db_users -> Queries, the tool should automatically select and activate the associated connection and database context. The user does not need to manually switch connections or select the active DB before running the script.
Storage Directory:
Database-specific queries can be stored in subfolders or event at sqlite categorized by connection and database:
/queries/{connection_id}/{database_name}/
Execution Safety: Opening a query from a database's local folder automatically locks the execution context, preventing accidental runs on the wrong schema or connection.
4. Why this is the perfect solution
No Breaking Changes: It preserves the current global query workflow for users who prefer it.
Automatic Context Switching: Eliminates manual steps and connection confusion when opening saved scripts.
Clutter Reduction: Users with dozens of databases don't have to scroll through a massive flat list of queries to find the one they need.
Contextual Focus: Keeps the workspace organized, clean, and highly intuitive when switching between different projects or database schemas.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
1. Core Concept: Hybrid Query Storage
I would like to suggest an improvement to how queries are organized. I propose introducing an additional Database-Specific Query Store ( like in navicat).
This hybrid approach gives developers the best of both worlds:
2. Proposed UI/UX Structure
Visual Representation:
3. How it Works (Under the Hood)
Saving a Query: When saving a query tab, the user can choose whether to save it globally or bind it to the currently active database (e.g., via a simple checkbox/toggle or path selector in the save dialog).
Connection & Database Binding (Auto-Switch): Each saved query in the database store is strictly bound to its specific connection and database. When a user opens a saved query from db_users -> Queries, the tool should automatically select and activate the associated connection and database context. The user does not need to manually switch connections or select the active DB before running the script.
Storage Directory:
Database-specific queries can be stored in subfolders or event at sqlite categorized by connection and database:
/queries/{connection_id}/{database_name}/
Execution Safety: Opening a query from a database's local folder automatically locks the execution context, preventing accidental runs on the wrong schema or connection.
4. Why this is the perfect solution
No Breaking Changes: It preserves the current global query workflow for users who prefer it.
Automatic Context Switching: Eliminates manual steps and connection confusion when opening saved scripts.
Clutter Reduction: Users with dozens of databases don't have to scroll through a massive flat list of queries to find the one they need.
Contextual Focus: Keeps the workspace organized, clean, and highly intuitive when switching between different projects or database schemas.
All reactions