Nyall Dawson
8459fe1468
Replace use of QRegExp in db manager
2024-01-31 10:55:33 +10:00
Sandro Santilli
4fbc42fd2b
Drop references to unused psycopg from db_manager
2024-01-25 18:03:38 +01:00
Nyall Dawson
dd2f8a9d01
Upgrade enums
2024-01-22 19:02:40 +10:00
Julien Cabieces
9d12ae8e6d
[PyQt6] Add scope for enums and get rid of PyQt5.XXX import
...
this has been done automatically with the following comand line
./scripts/3to4/3to4.py --only-qgis3-compatible-changes ./python/plugins/
./scripts/3to4/3to4.py --only-qgis3-compatible-changes ./tests/src/python/
2024-01-10 21:15:27 +10:00
nicogodet
8fb3352348
Raise error if PostgreSQL version can't be parsed
2023-08-30 09:45:40 +02:00
Nicolas Godet
138e6dad65
Use raw string
2023-08-29 10:46:53 +02:00
Nicolas Godet
8ebf323381
More robust retrieval for PostgreSQL version
2023-08-29 09:44:20 +02:00
Etienne Trimaille
8f33d5ee70
Upgrade DBManager and Grass plugins to Python 3.X
2023-04-26 08:24:00 +10:00
Harrissou Sant-anna
d6b5b070d8
Remove unicode string notifier from python files
2022-12-11 08:58:21 +01:00
Alessandro Pasotti
5a572dacaa
Fix DB manager postgis double query
...
Fixes #45318
2021-10-02 07:18:18 +10:00
Evan Derickson
4b50c1a7a7
For loops to list comprehension
2021-01-23 16:06:29 -08:00
Alessandro Pasotti
3a2b8f889a
Optimize column information
2020-12-21 11:36:47 +01:00
Alessandro Pasotti
3b6178ad3b
Merge pull request #38981 from elpaso/bugfix-gh38975-and-other-db-manager-issues
...
Bugfix gh38975 and other db manager issues
2020-09-24 18:42:56 +02:00
Alessandro Pasotti
871f534ef9
Fix PG db-manager rename schema
...
Fixes #38998
2020-09-24 14:23:26 +02:00
Alessandro Pasotti
9880a751a9
DB manager Fix SHOW in PG queries
...
Fixes #8975
2020-09-23 15:14:04 +02:00
Alessandro Pasotti
ef02c54252
Be smart when adding limit: followup #8092
2020-09-22 09:26:13 +02:00
Alessandro Pasotti
d54c3101ae
Add feedback to executeSql
...
Fixes #38092 by adding an optional QgsFeedback argument to
the executeSql method and by implementing the PQCancel
method in the PG provider internals.
While the cancellation works well for all supported provider while
fetching results in the loop, the cancellation of a running query is now
implemented for the postgres provider connection only because the GPKG
and GDAL both rely on GDALDatasetExecuteSQL which cannot be interrupted.
This PR also introduce a few optimizations in the PG DB-Manager
code that should probably fix also other "slowness" issues that
were reported after 3.x during PG query execution.
A small UX change in th SQL dialog makes it evident to the user that
a cancellation request has been sent to the backend: the button text
is changed to "Cancellation requested, please wait..." so that for
provider connections that are not able to interrupt the running query
and must wait for the fetching loop to exit from the exeuteSql call
the user knows that something is happening and that a cancellation
request has been successfully sent.
2020-09-19 11:15:41 +02:00
Alessandro Pasotti
21f6f576b9
Fix DB manager date time display in SQL window
...
Fixes #35140
2020-06-09 08:35:31 +10:00
Nyall Dawson
b6a7a10703
Fix some more python formatting issues, remove more flake exceptions
2020-05-11 11:41:50 +10:00
Matthias Kuhn
0afe134076
Noqa
2020-05-05 23:43:27 +02:00
Matthias Kuhn
9eae0caa09
Add missing imports
2020-05-05 22:39:16 +02:00
Matthias Kuhn
a7e0831dcf
Code style
2020-05-05 22:38:37 +02:00
José de Paula Rodrigues Neto Assis
304a3d9509
Comment clarifying query against pg_catalog
2020-04-26 15:02:43 -03:00
José de Paula Rodrigues Neto Assis
689bcc6020
Handle CONSTRAINT TRIGGER on DB Manager/PostgreSQL.
...
Fixes #35967
2020-04-24 11:27:43 -03:00
Sandro Santilli
b2af13bdcc
[DBManager] Use ST_EstimatedExtent with newer PostGIS
...
Avoids errors with PostGIS 3.0+ ("st_estimated_extent" does not exist
anymore with that version).
2020-03-17 20:36:13 +01:00
Corentin.F
d87843c2c3
Correct bug from postgres comment using quote or caps
2020-02-28 08:36:58 +10:00
Alessandro Pasotti
949efbd84e
DB Manager: fix tests and minor cleanup
2020-01-31 13:35:29 +01:00
Alessandro Pasotti
a6e9050453
DB manager PG connection proper API usage
...
Fixes #34132
2020-01-31 10:47:28 +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
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
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
f034317665
Use the new QgsAbstractDatabaseProviderConnection interface
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
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
Matthias Kuhn
f3dd5150c7
[db_manager] Detect CRS in advanced add layer
2019-10-06 18:43:57 +02:00