Feature request #9344

Queries saving in DBManager

Added by didier peeters almost 9 years ago. Updated over 7 years ago.

Category:DB Manager
Pull Request or Patch supplied:No Resolution:fixed/implemented
Easy fix?:No Copied to github as #:17947


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.


#1 Updated by Médéric RIBREUX over 7 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


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):

          <query type="QString">SELECT * FROM ENS</query>
          <name type="QString">ENS</name>
          <query type="QString">SELECT * FROM PAE</query>
          <name type="QString">SDF</name>

This has been introduced in this commit: #6bd1b78b18e25a6775863f0eef1079391a910dea

Also available in: Atom PDF