640 Commits

Author SHA1 Message Date
Sandro Santilli
d39b6ac77d
Merge pull request #33225 from strk/dbmanager-reconnect-button
DBManager PostgreSQL backend using core APIs instead of psycopg2
2020-01-20 12:05:22 +01:00
Sandro Santilli
5b4e581d03 Remove debugging 2020-01-14 10:42:56 +01:00
Sandro Santilli
6a20ed41a7 Extract field type from QgsField 2020-01-14 10:39:31 +01:00
Sandro Santilli
8ca08ec798 Set field precision and lengths from QgsField 2020-01-14 10:34:45 +01:00
Sandro Santilli
b4f4c331b7 Use lazy evaluation for query result descriptions 2020-01-14 10:31:11 +01:00
Alessandro Pasotti
0c2c133d83 DB manager use postgresraster provider instead of GDAL 2020-01-13 14:02:19 +01:00
Sandro Santilli
1ee8034e5b Handle query error 2020-01-10 14:52:33 +01:00
Sandro Santilli
bf4ed9ad47 Use QgsVectorLayer to retrive field names from queries 2020-01-10 09:46:05 +01:00
Sandro Santilli
8e5ff28077 Revert "Start reorganizing DB connection for SQL window dialog"
This reverts commit 0ad368a9d28128a4f80896cc6f9989f12b758840.
2020-01-09 10:08:03 +01:00
Sandro Santilli
ae8f35926f Make CursorAdapter more generic (directly use AbstractConnection) 2020-01-09 10:08:03 +01:00
Sandro Santilli
95cb05e12e Fix disabling of debug 2020-01-09 10:08:03 +01:00
Sandro Santilli
5109e17019 Drop debug calls, and unused import 2020-01-09 10:08:03 +01:00
Sandro Santilli
d2d723b91b Do not get db and user names from the env if service is used 2020-01-09 10:08:03 +01:00
Sandro Santilli
07d88b1aaf Set dbname from environment, if not set already 2020-01-09 10:08:03 +01:00
Sandro Santilli
67ce48f698 Hard-code provider name in connector, so existing test is fixed 2020-01-09 10:08:03 +01:00
Sandro Santilli
6aa87fa67b Rename CursorProxy to CursorAdapter 2020-01-09 10:08:03 +01:00
Sandro Santilli
e0ec0e0b3b Make CursorProxy scrollable, tweak more of the adapter 2020-01-09 10:08:03 +01:00
Sandro Santilli
285a98431f Remove debugging line 2020-01-09 10:08:03 +01:00
Sandro Santilli
bb12bf2cca Add special code to ensure a NULL value gets converted to None
NOTE: this should really be done in lower levels
2020-01-09 10:08:03 +01:00
Sandro Santilli
7acbc362c0 Fix more Cursor execution functions (rename table) 2020-01-09 10:08:03 +01:00
Sandro Santilli
18c51c485c Fix TopoViewer plugin 2020-01-09 10:08:03 +01:00
Sandro Santilli
f034317665 Use the new QgsAbstractDatabaseProviderConnection interface 2020-01-09 10:08:03 +01:00
Sandro Santilli
3892faeb1c Start reorganizing DB connection for SQL window dialog
Working toward resolution of #31994 (allowing reconnect on
connection loss)

[skip ci]
2020-01-09 10:08:03 +01:00
Nyall Dawson
b37dd0984e Rip off a band aid, and deprecate all "proj4" calls from the API
Alias these across to new "proj" methods, which don't include the
version number.
2019-12-20 12:13:06 +10:00
Borys Jurgiel
dbdc397fd8 [DB Manager] Fix broken geometry type of GeoPackage based SQL Layers. Fixes #33232 2019-12-16 10:08:44 +10:00
Matthias Kuhn
574e0ebaa1 [db_manager] Allow opening .sql files
and not only .SQL files
also allow any file extension

Fix #33173
2019-12-02 01:43:28 +10:00
Alessandro Pasotti
7f6b3cf877 Fix DB manager PG rename table
Fixes #32808
2019-11-14 13:42:36 +01:00
Alessandro Pasotti
6c9f01e28d Fix postgis 12 adscr -> adbin consrc -> conbin 2019-11-06 12:53:52 +01:00
Juergen E. Fischer
002d3986d5 translation string fix 2019-11-03 19:00:08 +01:00
Matthias Kuhn
aa3ba9d119
Merge pull request #32125 from m-kuhn/db_manager_select_geom_type
[db_manager] Allow selecting geometry type in context menu
2019-10-26 19:54:23 +02:00
Sebastian Niklasch
1a45936595 prevent AttributeError
If os.path.isfile(sqlite_cache_file) is False, the Attribute cache_connection was not assigned and so an Attribute Error occured in the following lines.
2019-10-26 15:59:39 +10:00
Juergen E. Fischer
b81d306047 spelling fixes (closes #32408) 2019-10-26 10:50:30 +10:00
Matthias Kuhn
ea510e83ef
Update python/plugins/db_manager/db_plugins/plugin.py
Co-Authored-By: Alessandro Pasotti <elpaso@itopen.it>
2019-10-07 09:18:34 +02:00
Matthias Kuhn
f3dd5150c7 [db_manager] Detect CRS in advanced add layer 2019-10-06 18:43:57 +02:00
Matthias Kuhn
2555e6420c Initialize variable 2019-10-06 18:43:57 +02:00
Matthias Kuhn
c9133ee75d Update python/plugins/db_manager/db_plugins/plugin.py
Co-Authored-By: Nyall Dawson <nyall.dawson@gmail.com>
2019-10-06 18:43:57 +02:00
Matthias Kuhn
da31655549 Update python/plugins/db_manager/db_plugins/plugin.py
Co-Authored-By: Nyall Dawson <nyall.dawson@gmail.com>
2019-10-06 18:43:57 +02:00
Matthias Kuhn
fd9cc9354f Fix python warning 2019-10-06 18:43:57 +02:00
Matthias Kuhn
54354406d0 [db_manager] Allow selecting geometry type in context menu
When a layer has a generic "GEOMETRY" type, it will only be listed once in the db_manager
but with an additional context menu entry for advanced properties, where one can select
the geometry type and the CRS.

Fix #32119
References #30787
2019-10-06 18:43:47 +02:00
Giovanni Manghi
cd71ea1f3c change confusing parameter name in DB Manager 2019-10-02 09:12:52 +01:00
Alexander Bruy
cebdc8dded [dbmanager] don't ignore field modifiers (e.g. length or geometry
definition) when updating it (fix #27613)
2019-09-23 06:01:56 +10:00
Alexander Bruy
54c23d137f [dbmanager] handle attempts to edit raster tables (fix #30214) 2019-09-21 06:05:42 +10:00
Etienne Trimaille
37803810eb
fix combobox ID not having correct checked state when we update a SQL layer 2019-09-13 17:46:38 +02:00
Sandro Santilli
a01db6409c Have TopoViewer use custom layer ordering
This is used to make sure edges are rendered above faces and nodes
above edges, despite legend order.
2019-09-06 08:46:53 +02:00
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
Sandro Santilli
d921c20f58 Add support for "bbox" URI parameter in PostgreSQL provider
.. and use it from TopoViewer DBManager plugin

Closes #18107
2019-08-29 17:47:25 +02:00
Sandro Santilli
8cc683061c Update TopoViewer layer style templates
From 1.9 version to 2.18 version

Closes #31471
2019-08-29 16:36:55 +02:00
Alessandro Pasotti
fad258e37a
Merge pull request #31319 from elpaso/db_interface_new_constructors
New ctors for connections interface
2019-08-22 09:03:17 +02:00
Sandro Santilli
ae0721891b Restore TopoViewer functionality
This was broken in commit d7166404030292b9536e649795e9efec49225dfd
2019-08-21 17:27:48 +02:00
Alessandro Pasotti
a092a82b52 New ctors for connections interface
Tries to make it clearer what are the use cases for the two
constructors (name and uri).
2019-08-21 15:45:21 +02:00