Nyall Dawson
7be2925649
Remove QgsGeometry bool operator
...
This is too dangerous -- it gets silently casted to numeric values
instead of throwing compilation errors
2018-11-05 08:39:10 +10:00
Nyall Dawson
51f6fb0667
QStringLiteral
2018-10-16 13:32:05 +10:00
Nyall Dawson
46b6ffadda
Fix a bunch of QString warnings
2018-10-15 19:02:48 +10:00
Denis Rouzaud
d2fdfe8f6f
add null and is null macros for QgsFeatureId ( #8085 )
...
* add null and is null macros for QgsFeatureId
* Finalize FID_NULL
* No string to fid null conversion for now
* add parenthesis to fix macro call
2018-10-02 04:15:25 -08:00
Alessandro Pasotti
5ed02a7ae9
Use qgsVariantEqual in some places
2018-10-01 15:58:30 +02:00
Martin Dobias
bb0c629355
Fix loading style for non-spatial tables in Postgres+SpatiaLite ( fixes #19589 )
...
OGR is not affected by the bug.
Oracle and MS SQL are most likely affected, but I don't have them here to test.
2018-10-01 08:48:13 +02:00
Juergen E. Fischer
e3f63d8811
postgres provider: cast to text in uniqueStringsMatching ( fixes #19180 )
2018-09-19 13:17:01 +02:00
signedav
d844f0fc45
pg version check on json
...
and comparison with == to make it equal to the other checks and avoid confusions
2018-09-14 15:33:57 +10:00
signedav
04d770d613
removed unused docs
...
and unused db entry
2018-09-14 15:33:57 +10:00
signedav
75b9c66c99
displaystring of every json object
...
Removed unused stuff
2018-09-14 15:33:57 +10:00
signedav
f92a2ad1c0
json/jsonb type integration
...
an tests for map and list
2018-09-14 15:33:57 +10:00
Nyall Dawson
e0fa9eb9cf
Add QStringLiteral(), QStringLiteral( "" ) and QLatin1String( "" )
...
to banned keywords
And replace use with QString()
2018-08-31 12:31:27 +10:00
Even Rouault
c76a1b507b
Postgres provider: fix build with old QT 5
2018-06-28 21:13:57 +02:00
Matthias Kuhn
d7b85c69f8
Merge pull request #7016 from m-kuhn/featureSourceEmpty
...
QgsFeatureSource::empty() method
2018-06-26 13:01:08 +02:00
Etienne Trimaille
6eeaca5570
return the default style first in the list
2018-06-22 09:23:47 +10:00
Mathieu Pellerin
0a325f1eda
Avoid signalling repaint / data signals when a setSubsetString doesn't actually change ( #7217 )
...
Behavior across providers harmonized & test added.
2018-06-11 15:52:23 +07:00
Matthias Kuhn
b568d6be55
Add optimized version of QgsPostgresProvider::empty()
2018-06-04 08:59:28 +02:00
Even Rouault
a9a8fbdb17
[cleanup] use for range based loop
2018-06-01 23:09:32 +02:00
Even Rouault
cc25727a18
[Postgres provider] Speed up feature insertion when pkid column is not set ( fixes #18976 )
...
When inserting features whose attribute column corresponding to the pkid
is empty, and tat this pkid column has a default value using a sequence,
then we can remove it from the INSERT statement completely, which save us
from doing a SELECT nextval(...) for each row. On the provided test case
of that ticket, on a debug build, this cuts down the insertion time from 5 minutes
to 1 minute 10s.
2018-06-01 22:31:09 +02:00
Nyall Dawson
1c615c15cc
More documentation compliance
...
Use Qt style "returns .." tense instead of "return ..", and lock
this in with a documentation compliance unit test
2018-05-25 15:09:00 +10:00
Nyall Dawson
44630b47ed
Add QgsDataProvider::ProviderOptions struct to constructors
...
for data providers
Allows a way to pass generic settings to providers, e.g.
passing a datum transform context for use in provider's
constructors.
2018-05-25 11:40:57 +10:00
Martin Dobias
0f5ea535cb
Implement project storage for PostgreSQL + tests of the storage
2018-04-07 12:58:02 +02:00
Juergen E. Fischer
fcacb0db7c
doxygen fixes
2018-04-02 22:48:40 +02:00
Nyall Dawson
7dd5cafc00
[postgres] Automatically populate layer metadata
...
Not much is available to automatically populate, but we can
set the abstract to match the table comment, the crs, and datatype.
2018-03-15 10:43:04 +11:00
Nyall Dawson
b920799a29
Fix leak in postgres provider loadStyle
2018-02-26 18:40:03 +11:00
Nyall Dawson
8ce519d2ad
Fix memory leak in QgsPostgresProvider::createEmptyLayer
2018-02-26 18:40:03 +11:00
Nyall Dawson
fb3e1c398d
Fix intermittently failing postgres provider test
...
Provider can crash if features do not have enough attributes
set to match fields in layer.
2018-02-26 18:40:03 +11:00
Nyall Dawson
84d2443b0a
Try to fix postgres provider handling of missing attributes
2018-02-17 19:10:04 +11:00
Nyall Dawson
0e68a3e775
Rollback rejection of features with too many attributes
...
Turns out editable joins rely on this situation. Instead change
the providers to warn on this occurance, and make the memory
provider alone truncate the extra attributes (since it doesn't
have an external backend or disk based format which natively
applies this truncation)
2018-02-17 19:10:04 +11:00
Nyall Dawson
0a5d48612c
Add provider test to ensure providers reject adding features
...
with geometry type mismatch
2018-02-17 19:10:04 +11:00
Nyall Dawson
7187ae3544
Ensure ogr, postgis and memory providers reject features
...
with too many attributes
2018-02-17 19:10:04 +11:00
Denis Rouzaud
bfe35c26ea
[postgres] use pg_type rather than information_schema.domain_constraints to retrieve domain
...
otherwise there is no warranty to retrieve the correct constraint as its name is not unique
2018-02-11 17:29:18 -04:00
Denis Rouzaud
498e55186c
[postgres] fix domain not in public schema
...
fix #18053
correctly set enumeration widget in case the domain is not in public schema
also fixes an issue if two domain with the same are present in two schemas
2018-02-10 15:26:29 -04:00
Harrissou Sant-anna
3f801b5d16
Switch SpatiaLite and PostgreSQL place in Datasource
...
Manager dialog
Moves up SpatiaLite tab near GeoPackage's as they are both simple file databases and their dialog look alike.
2018-01-23 12:35:44 +11:00
Martin Dobias
6a4b8b4762
Fix retrieval of 4D geometries (XYZM) from postgres ( fixes #17814 )
2018-01-17 15:38:27 +01:00
Nyall Dawson
a15b54d997
Swap missing 0->nullptr and add missing overrides
2017-12-12 21:14:58 +11:00
Alessandro Pasotti
9f56878d88
[bugfix] Add some more logic to get the schema name if empty
2017-11-22 17:22:14 +01:00
Alessandro Pasotti
23dfb1de57
[bugfix] Browser panel D&D a layer onto a postgresql connection tree node icon fails without notice
...
Fixes #17518 by defaulting to "public" if no schema is given
2017-11-22 13:02:15 +01:00
Nyall Dawson
75885d70d5
Rename various WKT/WKB/GeoJSON/GML methods for consistency
...
and consistent capitalisation
2017-11-15 20:51:05 +10:00
Alessandro Pasotti
fe5653101a
[bugfix][postgresql] Fix crashes on featureCount()
...
Fixes #17388
Needs backporting
2017-11-10 16:32:50 +01:00
Matthias Kuhn
b18c891dfc
[postgres] Fix default value check if evaluated server side
2017-11-09 01:19:35 +01:00
Matthias Kuhn
3b0b82cbe5
[postgres] Distinguish empty and NULL values
2017-10-28 23:14:24 +02:00
Juergen E. Fischer
25b0421752
follow up f243b8448e2
2017-10-21 17:55:28 +02:00
Juergen E. Fischer
f243b8448e
postgres: add support for partitioned tables (implements #17302 )
2017-10-21 17:39:18 +02:00
Juergen E. Fischer
e6f5236527
postgres provider: queries have an unknown relation type
2017-10-21 17:39:18 +02:00
Matthias Kuhn
d4635d042d
Merge pull request #5317 from pblottiere/bugfix_style
...
[bugfix] Fixes #17234 save/load styles from Postgres when a service file is used
2017-10-16 10:27:10 +02:00
Blottiere Paul
924ce81790
Fixes #17234 save/load styles from Postgres when a service file is used
2017-10-06 17:16:24 +01:00
Nyall Dawson
04a9cd9211
Add more consistency to doxygen formatting
2017-10-06 08:19:00 +10:00
Nyall Dawson
92af1dacaf
Replace default constructors/destructors with = default
2017-10-01 06:52:14 +10:00
Nyall Dawson
8c3939e756
More efficient use of QStrings
...
- use .isEmpty() instead of == QLatin1String( "" ) to check for
empty strings
- use .clear() instead of = QLatin1String( "" ) to empty a string
- remove unnecessary QString initializations
2017-09-28 05:25:51 +10:00