92 Commits

Author SHA1 Message Date
Stephen Knox
a39a413b92 Fixing db_manager so that it can run sql with inline comments
Fixes #29089
2019-09-06 10:26:34 +10:00
lbartoletti
81c4b81b3b [bugfix] Fix the whole text instead of the selected part in db_manager save SQL file. fixes #30616 2019-07-22 18:41:01 +10:00
Nyall Dawson
ef8d893393 More QgsMapLayer python fixes 2019-03-27 09:11:15 +10:00
Nyall Dawson
ac651ee0d9 Followup 8d51a693, fix broken plugins 2019-03-27 07:20:43 +10:00
Denis Rouzaud
8d51a693a1 missing changes of QgsMapLayer::Type => QgsMapLayerType 2019-03-26 14:09:19 -05:00
Alessandro Pasotti
74aa8ca16e Fix db manager sql query
Fixes #21353
2019-02-23 11:10:50 +01:00
Etienne Trimaille
f37d48f69b
keep comments when save as preset or file, remove lines starting by "--" in DBManager 2019-02-18 22:04:34 -04:00
Etienne Trimaille
427cb0b27a fix some HIG and add missing translations in dbmanager 2019-02-05 10:48:47 +11:00
Etienne Trimaille
ac9c6f1e18 some minor code cleanup in dbmanager 2019-02-05 10:48:47 +11:00
Alessandro Pasotti
3618d63ca6 Show an error message when a query yields an invalid layer
... instead of failing silently
2018-12-14 15:09:46 +01:00
Alessandro Pasotti
b5181f2c50 sqlite accept aliased queries from db manager
Fixes #20674 - DB Manager - load sql query as layer with geom column

Well, not sure it really fixes that particular issue because it
is not really well described, but for sure this fixes the general
case of "SELECT * FROM my_table AS my_alias"
2018-12-08 11:15:49 +01:00
Blottiere Paul
4e209724cf
Merge pull request #8260 from lbartoletti/dbmanager_add_save_sql_file
[FEATURE][needs-docs]Add buttons to load and save an external SQL file
2018-11-19 04:49:59 +00:00
lbartoletti
03d53fb871 missing translations; add extension at save 2018-11-13 09:22:33 +01:00
lbartoletti
ebdc932ec2 add LastDir for SQL File 2018-11-13 08:20:20 +01:00
lbartoletti
5eecbf2d4c Add translation ; add button 'load file' 2018-11-12 17:48:14 +01:00
Nyall Dawson
dc72f06e53 Bump minimum Qt version to 5.9 2018-11-06 08:45:37 +10:00
Nyall Dawson
f3e9aaf79a Fix some inefficient python dictionary iteration 2018-10-31 08:42:51 +10:00
lbartoletti
74f7cb5414 Add a button to save the query as an external sql file 2018-10-22 12:26:14 +02:00
Alessandro Pasotti
a74b6262df [dbmanager] Fix stored queries retrieve
Fixes #19802 - DB Manager saved SQL statements are saved empty
2018-09-18 18:22:58 +02:00
Nyall Dawson
9d8202b66a [dbmanager] Fix exception on older Qt builds
Fixes #19309
2018-06-30 18:35:38 +10:00
Salvatore Larosa
84d86935e4 set limit to 20 to store database query in the history 2018-04-05 22:53:04 +02:00
Salvatore Larosa
1242402a56 [FEATURE][needs-docs] DB Manager: adds SQL query history 2018-04-04 23:30:48 +02:00
Blottiere Paul
fea66f9913 Update ui and add shortcut to cancel pending query 2018-03-02 09:43:26 +00:00
Blottiere Paul
957e92c847 Add async model for virtual layers 2018-03-02 09:43:26 +00:00
Blottiere Paul
bf7df6d2e3 Add a cancel button for Postgis and Spatialite 2018-03-02 09:43:26 +00:00
Matthias Kuhn
8473df562f
More endless hourglass protection 2017-07-30 22:18:25 +02:00
Harrissou Sant-anna
6fab688298 Use SpatiaLite right spelling when needed 2017-07-07 01:26:38 +02:00
Juergen E. Fischer
f00a87cb8a update translation strings 2017-03-05 10:21:24 +01:00
Harrissou Sant-anna
ef85cdcf83 Replace "eg" by "e.g." or "for example" 2016-12-30 00:03:22 +01:00
Martin Dobias
d56a97d4fe Merge QgsMapLayerRegistry into QgsProject
All methods/signals of QgsMapLayerRegistry moved verbatim to QgsProject.
2016-12-10 15:18:12 +08:00
Juergen E. Fischer
31df84aa6b run 2to3 on source 2016-09-21 23:30:04 +02:00
Mathieu Pellerin
cd1d44be9d [db manager] python3 support (#3512) 2016-09-20 09:34:36 +02:00
Juergen E. Fischer
a6954b2771 [dbmanager] re-enable line number again (followup 5e36de7 and d9f934f) 2016-07-03 20:22:13 +02:00
Matthias Kuhn
5e36de70b0 [dbmanager] Fix error when opening SQL window 2016-07-03 14:48:17 +02:00
Juergen E. Fischer
d9f934f950 db manager: re-enable margins with line numbers in sql editor
(fixes #15110)
2016-06-22 22:41:44 +02:00
Denis Rouzaud
8071acd064 move PyQt compat folder to python/qgis 2016-04-29 14:10:26 +02:00
Juergen E. Fischer
c55f8b73f0 db_manager: cleanups 2016-03-21 17:00:24 +01:00
Juergen E. Fischer
8bda5c00a5 db_manager: migrate to new style signals 2016-03-15 23:46:54 +01:00
Juergen E. Fischer
c6d921729e python fixes:
* issues identified by pyflakes (star and unused imports)
* pyqtwrapper: add QtSvg
* some exceptions e.message => unicode(e)
* some translations tr("..." % foo) => tr("...") % foo
* TODO:
  python/console/console_sci.py:547 QsciScintillaCompat?
  python/plugins/db_manager/dlg_query_builder.py:304 pop_up_error?
2016-03-15 17:25:23 +01:00
Juergen E. Fischer
00633811c9 spelling fixes 2016-01-21 10:42:25 +01:00
Juergen E. Fischer
c2fb11c8d5 db manager: only alias subqueries on postgres (fixes #13731) 2015-12-02 09:24:25 +01:00
Giuseppe Sucameli
c4dcb7b812 [DbManager] delete layer passed to querybuilder to set sql layer filter (follow f6e31613) 2015-11-30 00:38:06 +01:00
Sebastian Dietrich
f6e3161317 Added a button to set a filter for a query layer. 2015-11-29 13:19:55 +01:00
Sebastian Dietrich
e04d5e4d70 replaced 'LIMIT 0' by 'WHERE 0=1' (fixes #13731) 2015-11-17 21:29:19 +01:00
Juergen E. Fischer
bf64f8d0a0 spelling fixes and indentation update 2015-10-22 21:56:54 +02:00
Giuseppe Sucameli
2a57b17068 DBManager: avoid loading a query as layer with missing fields (fix #11037),
restore combo style and label when multiple unique fields for view are not supported (follow 8e45da9d7e)
2015-10-22 19:23:42 +02:00
Sebastian Dietrich
8e45da9d7e db_manager allows multiple column primary keys only for PostGIS queries, not for SpatiaLite. 2015-10-18 18:10:01 +02:00
Sebastian Dietrich
d8deb8c081 Db_Manager keeps the selected columns for primary key and geometry when running the query or rereading the columns if the selected columns still exist. 2015-10-17 16:43:54 +02:00
Sebastian Dietrich
724a5bda9a Db_Manager now allows to select multiple columnns as the primary key for a query. 2015-10-17 16:15:21 +02:00
Sebastian Dietrich
20283a4dfc Unified the way the column comboboxes are filled when executing the query and when pressing the load columns button. 2015-10-17 02:19:41 +02:00