Nyall Dawson
a2efab0485
Make QgsVectorLayerImport use QgsCoordinateReferenceSystem
...
references, not pointers
2016-07-15 06:00:11 +10:00
Nyall Dawson
e683101b10
Make QgsVectorDataProvider::fields() return a copy
...
Implements a QGIS 3.0 TODO
2016-07-15 05:59:02 +10:00
Nyall Dawson
1bafa80089
Const correctness for numerous data provider methods
2016-07-15 05:57:57 +10:00
Matthias Kuhn
7b3e667282
Remove more debug noise
2016-06-12 16:05:40 +02:00
Juergen E. Fischer
ef0f3d5b8c
use Qt types
2016-06-10 11:08:09 +02:00
Sandro Santilli
8b9a03536a
Fix handling of int64 primary keys to use a FidMap
...
There was a code duplication where only one path did the right
thing. This commit also removes the duplication.
2016-06-09 11:48:30 +02:00
Sandro Santilli
92dda429d0
Do not loose signed semantic on converting int32 pk to fid
...
Fixes again editing of features with negative identifiers.
Now a test fails, but it is the test being broken this time
(testSignedIdentifiers). The test was added as part of
2bd7f446b4dd368968f23b990262c5e8a5a83f80, which fixed a crash
when using signed identifiers.
2016-06-09 11:48:29 +02:00
Sandro Santilli
f4a135b535
Only shift 32bit int identifiers when negative
...
Fixes existing tests to retain expectances
2016-06-09 11:48:29 +02:00
Sandro Santilli
e763b41c08
Use FidMap for int64 primary keys
...
Also rename pktInt64 to pktUint64, in case we'll be able to know
in advance the database contains only positive integers (not
implemented in this commit).
2016-06-09 11:48:29 +02:00
Sandro Santilli
a7a0eefe72
Support negative short integer primary keys on PostgreSQL
...
See http://hub.qgis.org/issues/14262
NOTE: signed int64 keys would still fail
2016-06-09 11:48:28 +02:00
Nyall Dawson
768fc2c790
Use QgsCRSCache in more places
...
Forward port from sourcepole/kadas-albireo
2016-06-07 07:26:34 +10:00
Matthias Kuhn
662bf4300d
Move "evaluate default values" option to project properties
...
It was not properly placed in the application settings.
2016-06-03 10:02:38 +02:00
Nyall Dawson
ccc67ef7a5
Rename attributes support for postgres provider
2016-06-02 17:09:45 +10:00
arnaud.morvan@camptocamp.com
92f71b696c
Keep numeric fields type, length and precision in postgresql provider
2016-05-24 17:15:44 +02:00
Juergen E. Fischer
84121f2793
fix postgres provider message
2016-05-22 22:46:27 +02:00
Matthias Kuhn
c315113ed0
Fix memory leak
2016-05-14 00:38:19 +02:00
Matthias Kuhn
604da1f24d
Followup 59db4d0: Cleanup
2016-05-11 09:22:49 +02:00
Marco Hugentobler
0b4961c224
Fix warning
2016-05-06 16:51:41 +02:00
Marco Hugentobler
11b7a2702c
Move conversion of added/changed geometry to vector data provider
2016-05-06 15:26:13 +02:00
Nyall Dawson
fdd68963c7
[postgres] Improved handling of DOMAIN type fields
...
- show correct domain type as field type name
- correctly determine length and precision of domain types
- expose bpchar field type as 'character' to users, as postgres only
uses 'bpchar' internally and refers to bpchar as character in the
front end
2016-04-22 17:37:51 +10:00
Matthias Kuhn
101d834a16
Fix crash on postgis error
2016-04-15 12:00:45 +02:00
Matthias Kuhn
9a161ac449
Fix crash on exit: delete postgres connection pool before QApplication
2016-04-12 16:47:36 +02:00
Matthias Kuhn
5cd2319c3f
Also retrieve generated values for pktInt
2016-04-07 21:26:43 +02:00
Matthias Kuhn
4ec97c3362
[postgres] Update primary key on insert with pktFidMap
...
Helps to retrieve generated keys with views
2016-04-07 15:03:41 +02:00
Matthias Kuhn
d1c79d817c
[feature] allow generating default values on postgres just in time
...
The expression used to generate default values for a field on the
postgres database are currently being printed on the feature form.
nextval('serial')
A new option in the properties allows evaluating the expression before
usage and will directly print the new value in the feature form.
23
2016-04-04 11:08:23 +02:00
Juergen E. Fischer
a111889973
postgres provider: don't log expected failure (followup 6b3651fa)
2016-02-12 01:36:28 +01:00
Hugo Mercier
fa78ccf74d
Deprecate old WkbType in QgsDataSourceUri
2016-02-09 10:44:41 +01:00
Hugo Mercier
2ebd26a9ad
[postgres] Fix detection of 2.5D layer types
2016-02-09 10:44:41 +01:00
Nyall Dawson
7dc5eac8bd
Improve handling of time values in attributes
...
- make QgsVectorFileWriter respect QTime field values and only
convert to string if required by output format
- list time types as native types for memory, postgres and OGR
providers (OGR support depends on file format)
2016-01-28 22:14:25 +11:00
Nyall Dawson
0356752c64
DateTime is also a native type for postgres provider
2016-01-27 11:36:16 +11:00
Nyall Dawson
752f6bd150
Fix classes which violate rule of three, by implementing required
...
copy/= operators or making them private
This revealed (and fixes) some issues, including a potential crash
using server access control (refs #13919 ), and a potential crash with
diagrams
2016-01-22 18:45:45 +11:00
Juergen E. Fischer
ad1fd2a922
[API] Introduce optional QgsVectorDataProvider::ChangeFeatures
...
capability and changeFeaturss method to allows joint geometry and
attribute updates.
Currently only implemented in the postgres provider
2016-01-15 10:12:07 +01:00
Larry Shaffer
e7a1e2c2ec
Clean up with prepare commit script
2016-01-13 21:29:09 +01:00
Luigi Pirelli
68478a7363
[auth] PKI support to postgres provider
2016-01-13 21:26:52 +01:00
Juergen E. Fischer
71dc339106
more stl to qt ports and size_t => int fixups
2015-12-26 00:59:09 +01:00
Nyall Dawson
ec35dbee92
Fix some warnings when building with clang and -Weverything
2015-12-20 21:43:51 +11:00
Nyall Dawson
18614e11e3
Avoid container detachments by using const methods wherever possible
...
eg QList::at() instead of QList:[], constFind instead of find, ...
2015-12-16 20:15:46 +11:00
Nyall Dawson
576875e998
Followup 320c696 use clang-modernize to replace 0/NULL use with nullptr
2015-12-15 11:24:51 +11:00
Nyall Dawson
ee720796a3
Change size()/count() == 0 and count() > 0 to isEmpty() checks
...
Because:
- easier to read
- follows recommendations by clazy/KDAB
- potentially performance benefits
2015-12-08 22:45:06 +11:00
Juergen E. Fischer
60ad6887c2
indentation update
2015-12-04 22:52:31 +01:00
Juergen E. Fischer
fc7fea55ce
postgres provider: verify uniqueness of parent table primary keys ( fixes #13947 )
2015-12-04 21:08:29 +01:00
Jürgen Fischer
8e5ba3bf92
Merge pull request #2458 from SebDieBln/Postgres_GeomTypeDirect
...
[postgresprovider] Determine geometry type and srid directly from column type
2015-11-18 22:46:09 +01:00
Juergen E. Fischer
f6e4e75cd6
[FEATURE]postgres provider: add support for timestamp types
2015-11-18 19:23:03 +01:00
Sebastian Dietrich
d9bbce65da
Fix style and indentation isssues introduced in 6b3651faef3e02f48188ae8005c80b3a4e097a6b
2015-11-15 13:42:07 +01:00
Sebastian Dietrich
6b3651faef
Determine geometry type and srid directly from column type
2015-11-14 23:01:51 +01:00
Nyall Dawson
fd317701fb
Avoid warning
2015-11-11 19:51:42 +11:00
Juergen E. Fischer
68c015e8d5
postgres provider: catch if commit fails ( fixes #12462 )
2015-11-08 18:03:22 +00:00
Juergen E. Fischer
a181845ca7
postgres provider: skip IN when feature id list is empty (followup fe3417b5)
2015-11-08 18:03:22 +00:00
Sandro Santilli
65fb72a958
Properly set invalid topology layer as invalid
...
Fixes #13781 (crash)
(cherry-picked from 54cf972ac2334451e69d2171cc4f3e42da3880df)
2015-11-06 22:45:35 +01:00
Jürgen Fischer
6a1d206536
Merge pull request #2418 from nyalldawson/postgres_in
...
Use IN (...) for postgres FilterFids requests
2015-11-05 22:02:53 +01:00