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
Nyall Dawson
fe3417b5ef
Partial revert of 70bff3f
...
Commit was causing crashes in browser. Refs #13738
2015-11-05 21:23:04 +11:00
Nyall Dawson
79647728bd
Use IN (...) for postgres FilterFids requests when the primary
...
key is a simple (non compound) type
IN (...) is much faster than chained ...OR... clauses
Additionally, trying to filter by a large number of feature Ids
(eg > 30k ) fails when using the ...OR... approach, but works
using IN
2015-11-05 14:51:17 +11:00
Nyall Dawson
b7e1cae4f0
Switch double quoted single character to single quotes for some
...
QString methods
Using single quotes is a significant performance boost. Rough
benchmarks indicate the QString single quote methods take
about 15% of the time the double quote variants take.
2015-11-02 17:55:08 +11:00
Juergen E. Fischer
daa6510970
postgres provider: quote compound key columns in uri ( fixes #13710 )
2015-11-01 15:53:42 +01:00
Juergen E. Fischer
07632088f0
fix translation string
2015-10-27 17:15:16 +01:00
Nyall Dawson
70bff3f6aa
Finish flipping a lot of methods to take const references for
...
non-trivial types
2015-10-26 22:46:14 +11:00
Juergen E. Fischer
a3f41975c2
postgres provider: verify unique constraint it NOT NULL is not set on key columns ( fixes #13641 )
2015-10-23 23:00:56 +02:00
Matthias Kuhn
0f2dfdb19b
Reload data when subsetString changes.
2015-10-23 14:27:48 +02:00
Juergen E. Fischer
55babc3ee3
postgres provider: support NULL in composite keys ( fixes #13641 )
2015-10-20 23:08:43 +02:00