15 Commits

Author SHA1 Message Date
Nyall Dawson
8602a91a1d Add provider test for mssql 2015-12-11 07:14:03 +11:00
Nyall Dawson
89b9b67974 Handle type conversion failures for compiled expressions 2015-12-10 20:49:17 +11:00
Nyall Dawson
038646170f Fix spatialite provider test data (was missing primary key) 2015-12-10 16:18:30 +11:00
Alessandro Pasotti
0287daf8ab Merge pull request #2555 from elpaso/bugfix-pg-inherits
Additional tests for tables with inherits
2015-12-09 12:03:59 +01:00
Matthias Kuhn
be01b7eec5 [FEATURE] Add N:M relation editing possibilities
This adds the possibility to manage data on a normalized relational
database in N:M relations. On the relation editor in a form, the tools
to add, delete, link and unlink work (also) on the linking table if a
relation is visualized as N:M relation.

Configuration is done through the fields tab where on the relation a
second relation can be chosen (if there is a suitable relation in terms
of a second relation on the linking table).

Limitations
===========

QGIS is not a database management system.

It is based on assumptions about the underlying database system. In
particular it expects

 * A `ON DELETE CASCADE` or similar measure on the second relation
 * Does not take care of setting the primary key when adding features.
   Either users need to be instructed to set them manually or - if it's a
   database derived value - the layers need to be in transaction mode
   (currently only activatable through the API)
2015-12-08 15:49:01 +01:00
elpaso
96789f378e Added tests with use estimated metadata 2015-12-08 11:30:32 +01:00
elpaso
614db66129 Added failing test for tables with INHERITS 2015-12-04 17:54:54 +01:00
Nyall Dawson
26f7683cf5 OGR expression compiler fixes
- Allow simple operators as supported by OGR (+, -, * )
- Only return a partial compilation success if expression contains
"column"="column2". Since OGR SQL performs case insensitive
comparisons, we need to double check the result using QGIS'
expressions to ensure that case matches. Add unit tests for this
to provider tests.
2015-11-18 06:30:42 +11:00
Sebastian Dietrich
6ee90c32ec replaced COPY with INSERT INTO 2015-11-15 21:51:33 +01:00
Hugo Mercier
c7aeb774ce PostGIS: Allow to load TIN, PS and Triangle layers
The postgres provider is modified so that layers with
TIN, PolyhedralSurface and Triangle geometries can be loaded.
Geometries are converted to MultiPolygons (and Polygons for Triangles).

The postgres test is completed to cover the loading of different types
of layers
2015-10-21 09:41:49 +02:00
Nyall Dawson
f9917b55c3 Remove expected failure from shapefile provider unique values test
Failure was caused by GDAL bug #6020, which has now been fixed
in GDAL. It turns out the values are only incorrect if the first
feature in the file has a null value, so I've rearranged the
features in the reference shapefile to avoid this.
2015-07-12 19:55:54 +10:00
Nyall Dawson
99150dd39e Add delimited provider to common provider tests, fix records missing
from delimited layers when geometry was null.
2015-06-23 16:35:42 +10:00
Matthias Kuhn
32463d0c15 Postgres provider: test default values are correctly returned 2015-05-23 18:28:30 +02:00
Matthias Kuhn
afc3996f6c Add shapefile provider tests
+ Fix OGR provider so it does not return features without geometry when
filtering with a FilterRect
2015-05-22 21:03:47 +02:00
Matthias Kuhn
2fe3f55775 Provider testing
* Test more operations
 * Include spatialite tests
2015-05-22 19:39:24 +02:00