- handle PQsendQuery in one getNextFeature run (fixes nested iteration of
cursors with connection pooling)
- beautify DELETE and ALTER TABLE statements
git-svn-id: http://svn.osgeo.org/qgis/trunk@8313 c8812cc2-4d05-0410-92ff-de0c093fc19c
- remove some unnecessary includes
- add private PQexec method with additional debug output
- update all changed attributes of a feature at once
- fix quoting and beautify creation of SQL statements
- replace assertion on unexpected field types with useful debug output and
consider values as NULL
git-svn-id: http://svn.osgeo.org/qgis/trunk@8307 c8812cc2-4d05-0410-92ff-de0c093fc19c
- apply patch #1009 from Steven Mizuno. Thanks.
- remove column name and use of PQfnumber for cursors
git-svn-id: http://svn.osgeo.org/qgis/trunk@8292 c8812cc2-4d05-0410-92ff-de0c093fc19c
- make declareCursor and getFeature private
- there's no need to track column names in cursors
(which contained a bug triggering #962 again and more)
- introduce private method field(index) that verifies that
the index in valid or throws an exception.
- use that in public methods that get indexes from
outside (minValue, maxValue, uniqueValues...)
git-svn-id: http://svn.osgeo.org/qgis/trunk@8290 c8812cc2-4d05-0410-92ff-de0c093fc19c
- put common code from select/getNextFeature and getFeatureById methods
to new declareCursor and getFeature methods
- unify type handling and support bool, arrays and time types
(fixes#1009)
- ignore columns not explicitly supported (might apply to columns
previously supported implicitly; please file a bug if you run into
one)
- fixes a unreported problem with getFeatureById returning only NULL
attributes.
Please test!
git-svn-id: http://svn.osgeo.org/qgis/trunk@8285 c8812cc2-4d05-0410-92ff-de0c093fc19c
- implement getUniqueValues in QgsPostgresProvider (fixes#399)
- implement getUniqueValues, minValue and maxValue in OgsOgrProvider
- use getUniqueValues in QgsUniqueValueDialog
- update QgsPostgresProvider::storageType interface (fixes#995)
(applied patch from Steven Mizuno, thanks again)
git-svn-id: http://svn.osgeo.org/qgis/trunk@8233 c8812cc2-4d05-0410-92ff-de0c093fc19c
- check for NULL values on load
- show "NULL" in attribute table and identify results
- support entry of "NULL" in attribute table or dialog
- free result of PQexec in postgres provider (fixes memory leaks)
git-svn-id: http://svn.osgeo.org/qgis/trunk@8217 c8812cc2-4d05-0410-92ff-de0c093fc19c
- The bug occurs when you make two providers that
access the same table, and then try to iterate
through the features in each provider in a nested loop.
- The provider in the inner loop would never have any
features because all providers use the same cursor
name so things would get messed up.
- This patch fixes the bug by adding a providerId
member to QgsPostgresProvider, and appending the
id to all cursor names.
git-svn-id: http://svn.osgeo.org/qgis/trunk@8092 c8812cc2-4d05-0410-92ff-de0c093fc19c
determine the current schema in the postgresprovider and clear
the schema name of the table, if it's identical. That way we
only qualify tables, if we need to (like GDAL does).
Please test!
git-svn-id: http://svn.osgeo.org/qgis/trunk@7711 c8812cc2-4d05-0410-92ff-de0c093fc19c
qgis/src/providers/postgres/qgspostgresprovider.cpp:920: error: ‘mTables’ was not declared in this scope
Please fix and re-enable as needed
git-svn-id: http://svn.osgeo.org/qgis/trunk@7665 c8812cc2-4d05-0410-92ff-de0c093fc19c
All providers and python bindings have been updated accordingly.
Currently supported variant types by providers are String, Int and Double.
Other API changes:
- QgsField
- type info as QString is now typeName() and setTypeName()
- added variant type (QVariant::Type) info: type(), setType()
- QgsFeature
- removed fields() - use QgsVectorDataProvider::fields()
- removed boundingBox() - use QgsGeometry::boundingBox()
- QgsVectorLayer - removed fields(), fieldCount(), getDefaultValue() - use directly QgsVectorDataProvider
- QgsVectorDataProvider - getDefaultValue() - field now addressed by id, returns variant
- QgsLabel - setLabelField() - field now addressed by id
git-svn-id: http://svn.osgeo.org/qgis/trunk@6833 c8812cc2-4d05-0410-92ff-de0c093fc19c