Feature request #9344
Queries saving in DBManager
Status: | Closed | ||
---|---|---|---|
Priority: | Low | ||
Assignee: | - | ||
Category: | DB Manager | ||
Pull Request or Patch supplied: | No | Resolution: | fixed/implemented |
Easy fix?: | No | Copied to github as #: | 17947 |
Description
Wouldn't be nice to have the possibility to store the queries written in DBManager either in the project file OR in QGis a file in the personnal directory (~/.qgis2 on Mac OS X) for example. There are queries specific to a project but others are of more general use.
History
#1 Updated by Médéric RIBREUX about 9 years ago
- Resolution set to fixed/implemented
- Target version changed from Future Release - High Priority to Version 2.10
- Status changed from Open to Closed
Hello,
DBManager stores queries inside the current project (storePreset, deletePreset, loadPreset methods of dlg_sql_windo.py). You need to save the project after query building and storing to be sure to save the query.
Queries are stored inside the project under the savedQueries tag.
Here is an example of stored queries inside a project (XML):
<savedQueries> <q530639571> <query type="QString">SELECT * FROM ENS</query> <name type="QString">ENS</name> </q530639571> <q1704340978> <query type="QString">SELECT * FROM PAE</query> <name type="QString">SDF</name> </q1704340978> </savedQueries>
This has been introduced in this commit: #6bd1b78b18e25a6775863f0eef1079391a910dea