125 Commits

Author SHA1 Message Date
Alessandro Pasotti
ebf7d247d8 Provider default values: more tests and homogenize
Fixes #33383

Homogenization is not complete but at least
there are test cases for the future.
2020-01-27 18:21:19 +01:00
Alessandro Pasotti
63e66c232c PG: fix default value for IDENTITY PKs
Fixes #29560 - PostgreSQL identity column not recognized properly
2020-01-24 15:20:15 +01:00
Matthias Kuhn
c58f7f49e8 More debug for [travis] 2020-01-23 19:32:38 +01:00
Matthias Kuhn
b4eebfcd82 Add test output to postgres database startup
to debug travis
2020-01-22 14:52:21 +01:00
Even Rouault
bf7dffee6d QgsExpression::referencedAttributeIndexes(): only report valid indices
If the expression was referencing a non-existing field, -1 was returned in the
result set, which caused later crashed in various providers, including the
Spatialite, Postgres, etc..., due to tried to dereference mFields.at(-1)

Discarding invalid indices is what is also done in
QgsFeatureRequest::OrderBy::usedAttributeIndices()

Fixes #33878
2020-01-21 11:37:11 +10:00
Alessandro Pasotti
5af1306bf3
Merge pull request #33685 from elpaso/pgraster-pkeys
Native PostGIS raster data provider
2020-01-17 11:31:28 +01:00
Alessandro Pasotti
99ac4fb820 PG raster: do not require db name
... in case a service file is used
2020-01-14 08:28:10 +01:00
Alessandro Pasotti
483ed77b9b PG raster support composite PKs 2020-01-13 18:26:11 +01:00
Alessandro Pasotti
792fa4b7e8 PG raster: support SQL where conditions 2020-01-13 16:12:54 +01:00
speillet
1d818a4189 resolve review comments
resolve review comments
2020-01-13 22:25:23 +13:00
speillet
32ebc12d82 Add test to check identity field management 2020-01-13 22:25:23 +13:00
Julien Cabieces
e9cb34e1b8 fix multiline and multi surface skipping some parts 2020-01-13 13:24:25 +13:00
Julien Cabieces
1f3370a956 fix multipolygons with only one polygon 2020-01-13 13:24:25 +13:00
Julien Cabieces
a1f8af904b fix read for oracle curve polygon with Z coordinates 2020-01-13 13:24:25 +13:00
Alessandro Pasotti
feaf00fc4c Fix build on travis + minor cleanup 2020-01-10 14:23:21 +01:00
Alessandro Pasotti
4f55df03fc Support raster without constraints 2020-01-10 09:54:53 +01:00
Alessandro Pasotti
f822d45a8e First raster drawn! 2020-01-10 09:54:53 +01:00
Alessandro Pasotti
25972abdd2 Fix SRID on test data 2020-01-10 09:54:53 +01:00
Alessandro Pasotti
91d58f2904 Add testdata for PG raster 2020-01-10 09:54:53 +01:00
Alessandro Pasotti
c186f06f38 Test for PG raster provider 2020-01-10 09:54:53 +01:00
Julien Cabieces
e5fd756527 Configure Oracle continuous integration 2020-01-02 20:59:28 +10:00
Julien Cabieces
ba925bb36d Create child feature with geometry from the relation editor (#32528)
* [FEATURE][needs-docs] Create geometric child feature from relation editor
2019-12-04 14:46:32 +01:00
Sandro Santilli
30fe748469 Add test for pointcloud layers fetching and related permissions
This commit is expected to fail, lacking an actual fix

See #32972
2019-12-04 16:59:24 +10:00
Sandro Santilli
f543a9abb7 Add test for TopoGeometry layers visibility with and w/out permissions
Adds a "qgis_test_user" database users with the db setup script,
using an hard-coded password for connection.

This was the simplest way to make things work because the alternative
of using 'options' member in the URI is not supported by QGIS
at the moment, see https://github.com/qgis/QGIS/issues/32832
2019-11-15 13:14:42 +01:00
Sandro Santilli
c20ba1e5f3 Have db setup script check for pg_service.conf functionality
... and hint about how to set it up
2019-11-14 13:05:01 +01:00
Sandro Santilli
ea970d9ef1 Add test for extracting candidate primary keys from geometryless view 2019-11-10 11:48:48 +01:00
Alessandro Pasotti
f7d1971d01 PG views: be tolerant for unsupported field type ...
... if it's in URI key

Fixes #31799
2019-09-17 14:30:33 +02:00
Mathieu Pellerin
5df309447e
[delimiter text] Add Point{Z,M,ZM} geometry support (fixes #25645) (#31595)
[FEATURE][delimiter text] Add Point{Z,M,ZM} geometry support (fixes #25645)
2019-09-06 19:35:27 +07:00
Sandro Santilli
ffad801fad Add test for custom bbox in postgresql provider
See #18107
2019-08-29 17:47:25 +02:00
Sandro Santilli
81146a639d [tests] Load postgis_raster extension when available, and needed 2019-08-29 17:47:25 +02:00
Alessandro Pasotti
a3c4eb9947
Providers connections interface API
This is the implementation of the new DB connections API (grant proposal 2019).
Summary

The new API makes it available to QGIS core a new interface for provider connections and will allow to:

    replace the provider specific QgsSettings management in QGIS4 (save/load connections from the settings) NOT IN SCOPE FOR NOW.
    provide a unified API for common operations on DB connections:
        executeSql and get the results
        list tables names and properties and schemas
        create a new vector table (no rasters for now)
        create/rename/drop schemas and tables
        vacuum
       ....
2019-08-16 20:44:05 +02:00
Māris Nartišs
6eeb031134 WMS provider: Extract WMS-C TileSet layer title and abstract from matching WMS Layer data (fixes #30262) 2019-08-09 13:42:10 +03:00
Denis Rouzaud
0698eedc94
add test for detecting composite key relations (#31092) 2019-08-06 13:39:00 +02:00
Nyall Dawson
1164d204ee [postgres] Unit tests for citext field type 2019-07-02 06:17:37 +10:00
Nyall Dawson
aa1bc5d1f9 [needs-docs][postgres] Correctly handle binary (bytea) fields
Previously these would be silently dropped from the layers, but
we now have comprehensive support for binary fields and should
expose them.

Fix sponsored by WhereGroup
2019-07-02 06:17:37 +10:00
Alessandro Pasotti
a4187a7a6e Tests for case sensistive pg schema 2019-05-22 18:16:43 +02:00
Alessandro Pasotti
da49f79045 Suggestions from JEF 2019-04-26 12:32:42 +02:00
Alessandro Pasotti
a3368d416c Layout and SQL 2019-04-26 10:26:04 +02:00
Alessandro Pasotti
163082a061 More tests for checkPrimaryKeyUnicity 2019-04-26 09:19:51 +02:00
Alessandro Pasotti
38c91e4e97 [postgres] Fix checkPrimaryKeyUnicity option
This provider option was linked to the project level option
"Trust layer metadata..." which was implemented
to speed up loading of large dataset by trusting extent
read from metadata to avoid costly operations to determine
the layer extent.

Check PK unicity on the other hand has only effect on views
and query layers and it is useful as an independent
option to prevent loading of layers that have no PK (or the
wrong one).

But the operation of determine unicity of a values in a column
can also be costly, so better to get control back to the user.

Legacy default is preserved (the project-level "Trust..." option).

Fixes #21839

Funded by RAAB.nl
2019-04-24 17:14:42 +02:00
Juergen E. Fischer
f8e32f7b9e unit test for 2826ba34f 2019-04-07 15:35:43 +02:00
Alessandro Pasotti
61d361d674 GPKG: Rename styles when layers are renamed
Partially fixes #21227

TODO:

- DB manager
- Other providers
2019-02-12 19:37:01 +01:00
signedav
6e91349baa json gpkg tests 2019-01-08 11:50:35 +01:00
signedav
e9e7c397e9 add author and reader tables to test valuerelations with json 2019-01-07 11:39:48 +01:00
Matthias Kuhn
0c71e720a3
JSON Support for GeoPackage [FEATURE]
Merge pull request #8707 from signedav/json-for-gpkg
Integration of JSON type of GeoPackage
2019-01-07 10:35:30 +01:00
Alessandro Pasotti
07d9d1dbb8 Fix views query tables in spatialite
There is still an old issue: views are only available
through DB manager.

Fixes #20674 - again

- Life is really simple, but we insist on making it complicated.
Confucius
2018-12-18 18:32:14 +01:00
Alessandro Pasotti
e83e794016 spatialite: Add more test cases for table names with spaces 2018-12-15 11:08:05 +01:00
signedav
607dffd1aa basic tests for json type in gpkg 2018-12-11 13:12:35 +01:00
Nyall Dawson
06520be7b0 Spelling 2018-10-08 19:16:29 +10:00
Nyall Dawson
745495fe73 [mssql] Prevent overwriting existing tables via drag and drop in browser
Fixes #16805
2018-10-08 19:16:29 +10:00