672 Commits

Author SHA1 Message Date
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
Juergen E. Fischer
441f6f8cf1 postgres provider: allow detection of empty views (fixes #13638) 2015-10-20 14:42:45 +02:00
Nyall Dawson
1969e09b6f Also avoid detaching QgsFields and QgsAttributes where possible 2015-10-20 20:36:08 +11:00
Sebastian Dietrich
ab943f8b06 the test for uniqueness now also works for multiple columns 2015-10-17 23:20:10 +02:00
Sebastian Dietrich
a4124da2a9 When loading a query as a postgis layer the primary key may now also span multiple columns. 2015-10-17 23:20:10 +02:00
Sebastian Dietrich
a721949040 Moved the code to determine the primary key for a view using the URI keyColumn to a separate function. 2015-10-17 23:20:10 +02:00
Nyall Dawson
5ed3d1b73f Use QString::arg multi argument method to avoid extra heap allocations 2015-10-15 17:51:06 +11:00
Nyall Dawson
0caf944747 Misc optimisations identified by clazy:
- call reserve on container classes where applicable
- make sure Q_FOREACH uses references
- remove dynamic casts to base classes
- fix some implicit bool conversions
2015-10-05 18:43:18 +11:00
Juergen E. Fischer
1b4ca622c9 add cppcheck fixes 2015-10-03 21:57:17 +02:00
Larry Shaffer
0d2b945c05 [auth system] Data source integration for Postgres and Spit plugin 2015-09-21 08:51:18 -06:00
Nyall Dawson
f628ebd423 Replace foreach with Q_FOREACH
For:
- consistency
- to make it immediately clear that this is a Qt macro and that it
works slightly differently to c++ for loops
2015-09-09 19:17:29 +10:00
Nyall Dawson
7c10760225 Followup 73ffb83a, finishing changing all Q_FOREACH to references 2015-09-09 19:17:19 +10:00
Juergen E. Fischer
c5cce4bfdf postgres provider: add support for compound keys on views 2015-09-04 17:35:26 +02:00
Giuseppe Sucameli
7d79a73f58 Importing a layer, create an autoincremental integer pk if either no pk was passed or it's an integer field 2015-09-03 01:20:19 +02:00
Juergen E. Fischer
05b8a985a5 indentation update 2015-08-25 20:04:50 +02:00
Giuseppe Sucameli
762d28b8d4 Postgres/SQLite/MSSQL provider: fix addAttributes() fail (wrong syntax/empty statement) when argument is an empty list 2015-08-25 03:00:07 +02:00
mhugent
5807875797 Merge pull request #2268 from mhugent/curve_capture_tool
Curve capture tool
2015-08-24 18:18:40 +02:00
Juergen E. Fischer
0ccd7bd5bf postgres provider: avoid column lookups with tableoids 2015-08-18 11:04:16 +02:00
Marco Hugentobler
c39ffe9fc2 [FEATURE]: Tool to add circular strings with start point, curve point and end point 2015-08-17 17:14:05 +02:00
Juergen E. Fischer
c27f357be0 database provider: fix andWhereClauses 2015-08-04 14:22:14 +02:00
Matthias Kuhn
5be0ee734f Remove QgsFeatureRequest::FilterRect from providers/iterators 2015-07-29 12:09:44 +02:00
Marco Hugentobler
5706203584 Allow usage of node tool for postgis zm geometries 2015-07-29 10:44:35 +02:00
Juergen E. Fischer
48e4fb85c8 Revert "use triple quoting with st_estimatedextent in postgres provider and db_manager (fixes #12478)"
As it seems to address a meanwhile reverted behavior change in PostGIS 2.1
before it was released (see also https://trac.osgeo.org/postgis/ticket/2834).

This reverts commit 048aff01bb9cf42e2c1c17eb0ddbd81537443e19.
2015-07-13 11:15:40 +02:00
Juergen E. Fischer
b1dac74f2b postgres provider: fix indexing of default values (fixes #12996; folloup 61f39d6f) 2015-06-30 17:58:00 +02:00
Nyall Dawson
79305b272d [browser] Add rename, delete options for schemas and rename option
for layer for postgres providers
2015-06-27 11:26:23 +10:00
Juergen E. Fischer
048aff01bb use triple quoting with st_estimatedextent in postgres provider and db_manager (fixes #12478) 2015-06-24 18:08:26 +02:00
Juergen E. Fischer
454206711e fix 61f39d6 2015-06-19 16:20:13 +02:00
Juergen E. Fischer
61f39d6ff3 postgres provider: fix indexing of default values (fixes #12996) 2015-06-19 15:27:39 +02:00
Juergen E. Fischer
37ed83905f postgres provider: fix feature count on delete (fixes #12957) 2015-06-14 11:01:10 +02:00
Denis Rouzaud
9e3183c63f Revert "sort includes"
This reverts commit 2b7d3d3c73b50ba6dc74abec6dd652ff1b87c0ec.
2015-06-10 14:54:47 +02:00
Denis Rouzaud
2b7d3d3c73 sort includes 2015-06-10 13:59:08 +02:00
Marco Hugentobler
abe9fd0399 Move more wkb type code to QgsWKBTypes. Fix possibility to load curved geometries into QGIS 2015-05-29 10:56:46 +02:00
Nyall Dawson
d393d268e1 Fix up non-const getters for attributes and geometry in QgsFeature
(preparation for implicit sharing)
2015-05-20 21:46:15 +10:00
Juergen E. Fischer
1c64363ad0 postgres provider: avoid quering layer_styles if it doesn't exist 2015-05-12 11:10:36 +02:00
Nyall Dawson
2863f20d67 Add a const geometry getter to QgsFeature 2015-05-11 19:46:32 +10:00
Juergen E. Fischer
e509fc53ce postgres provider: cast result of a subquery in min/max/uniqueValue(s) (fixes #12630; followup bf56457 ff) 2015-05-10 10:55:42 +02:00