Bug report #1746
ogr provider functions uniqueValues(), minimum(), maximum() only work for file based datasources
Status: | Closed | ||
---|---|---|---|
Priority: | Low | ||
Assignee: | nobody - | ||
Category: | Data Provider | ||
Affected QGIS version: | Regression?: | No | |
Operating System: | All | Easy fix?: | No |
Pull Request or Patch supplied: | Resolution: | fixed | |
Crashes QGIS or corrupts data: | Copied to github as #: | 11806 |
Description
The ogr provider functions uniqueValues(), minimum(), maximum() only work for file based datasources. Also, if a sublayer of the datasouce is requested, the function only returns an empty variant:
QFileInfo fi( dataSourceUri() );
if ( !fi.exists() )
return QVariant();
Better approach would be to find out the layername and change the SQL accordingly
Associated revisions
OGR provider update (fixes #1746)
- use OGR and not the filename to deduce the layername
- fall back to QgsVectorDataProvider methods if OGR SQL doesn't work
- check error code of OGR_L_SetFeature
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@10972 c8812cc2-4d05-0410-92ff-de0c093fc19c
OGR provider update (fixes #1746)
- use OGR and not the filename to deduce the layername
- fall back to QgsVectorDataProvider methods if OGR SQL doesn't work
- check error code of OGR_L_SetFeature
git-svn-id: http://svn.osgeo.org/qgis/trunk@10972 c8812cc2-4d05-0410-92ff-de0c093fc19c
History
#1 Updated by Jürgen Fischer over 15 years ago
fixed in
#2 Updated by Jürgen Fischer over 15 years ago
- Resolution set to fixed
- Status changed from Open to Closed