- rename maxValue to maximumValue
- rename getUniqueValues to uniqueValues and let it return a list
of variants instead of strings.
- add protected convertValue to convert string values to attribute values
- update attribute dialog, continuous color dialog, graduated symbol dialog,
unique value dialog, postgres provider and ogr provider accordingly
- fixes#1250
git-svn-id: http://svn.osgeo.org/qgis/trunk@9196 c8812cc2-4d05-0410-92ff-de0c093fc19c
- track open cursors and commit transaction whenever no open cursors are left
- close cursor after immediately after feature retrieval (releases locks earlier)
- wrap postgres calls in Conn class
- introduce Result class to handle PQclear mostly transparently (fixes minor leaks)
- remove executeDbCommand method (duplicate of PQexecNR)
- introduce support for estimate_extents (fixes#582)
- introduce support for enum types (fixes#1210)
git-svn-id: http://svn.osgeo.org/qgis/trunk@9183 c8812cc2-4d05-0410-92ff-de0c093fc19c
Inspired by it I also enabled pedantic mode for MSVC and cleaned
up some more warnings found by GCC 4.3 and MSVC.
git-svn-id: http://svn.osgeo.org/qgis/trunk@9133 c8812cc2-4d05-0410-92ff-de0c093fc19c
QgsVectorLayer:
- move attribute part of editing to vector layer class and unify with geometry handling:
* remove commitAttributeChanges(), addedFeatures(), deletedFeatureIds(), changedAttributes()
and replace with changeAttributeValue(), deleteFeature(), addAttribute()
and deleteAttribute()
* add pendingFields(), pendingAttributeList(), pendingFeatureCount()
* emit signals on start editing and commit, change of attribute values, adding/deleting of
attributes and layer or feature removal (currently used in the attribute table)
- new commitErrors() method to query errors from commitChanges()
- replaced featuresInRectangle with select/getNextFeature combo
- edit types added to support more input widgets and input constraints
QgsFeature:
- remove update aware ctor
- unify geometry handling in ctors
QgsVectorDataProvider:
- add QVariant::Type to supportNativeTypes()
QgisApp:
- add instance() method to query QgisApp object
- replace code at various place to use it instead of passing the pointer
arround or searching it in the widget tree.
- move toggleEditing() code from the legend here
QgsAttributeTable/QgsAttributeTableDisplay:
- move attribute table creation legend here
- make attribute table dockable (from Tim)
- most editing logic moved to QgsVectorLayer
- adding/deleting attributes moved to QgsVectorLayerProperties
QgsIdentifyResults:
- add support for attribute editing when it edit mode
QgsVectorLayerProperties:
add a new tab to show attribute list:
* start/stop editing
* add/delete attributes
* assign edit type to attributes (unique values, value map, ranges)
QgsAttributeDialog:
add support for attribute edit types:
* selection from unique value render classes (combobox)
* selection from unique values of existing features (combobox or line edits with completion)
* spinboxes for ranges
QgsPostgresProvider:
- use read-only connection for cursors and read-write connection for updates
- updated native types
QgsOgrProvider:
- remove unused references to GEOS geometry factory
- updated native types
git-svn-id: http://svn.osgeo.org/qgis/trunk@9092 c8812cc2-4d05-0410-92ff-de0c093fc19c
- skip type check for unchanged defaults in QgsAttributDialog
- don't replace NULL default value with empty string
git-svn-id: http://svn.osgeo.org/qgis/trunk@8390 c8812cc2-4d05-0410-92ff-de0c093fc19c
- 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