-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[feature] Add stored query support to Execute SQL window #60761
base: master
Are you sure you want to change the base?
Conversation
This class is designed to be compatible with DB Manager's storage of queries in projects, but extended to allow storage within the local profile too.
This ports the equivalent functionality from DB Manager over to the core/browser "Execute SQL" dialog. Users can insert stored queries into their current query, save new stored queries, and remove queries via a new toolbar action. Users can opt to store queries in either the current project (ie the DB Manager approach, and this is fully compatible with existing queries stored via DB Manager) or in the local user profile (so that they are available across different projects) Sponsored by City of Canning
This is all functionally dead code -- it is not called from anywhere
@nyalldawson A documentation ticket will be opened at https://github.com/qgis/QGIS-Documentation when this PR is merged. Please update the description (not the comments) with helpful description and screenshot to help the work from documentors. Thank you! |
This pull request has been tagged for the changelog.
You can edit the description. Format available for credits
Thank you! |
🪟 Windows buildsDownload Windows builds of this PR for testing. 🪟 Windows Qt6 buildsDownload Windows Qt6 builds of this PR for testing. |
} ); | ||
|
||
|
||
const QList< QgsStoredQueryManager::QueryDetails > storedQueries = QgsGui::storedQueryManager()->allQueries(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a note, this may be not very convenient when user has A LOT of saved queries. But I do not know how common this scenario is and, unfortunately, right now I do not have a better idea how to implement it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I realise there's an inherent limit in the number of queries the UI will handle. I couldn't think of an alternative though, and the current db manager UI has had a similar constraint for years now without any requests to improve.
This ports the equivalent functionality from DB Manager over to the core/browser "Execute SQL" dialog.
Users can insert stored queries into their current query, save new stored queries, and remove queries via a new toolbar action.
Users can opt to store queries in either the current project (ie the DB Manager approach, and this is fully compatible with
existing queries stored via DB Manager) or in the local user profile (so that they are available across different projects)
Sponsored by City of Canning
Peek.2025-02-26.11-56.mp4