Adds supports for "layerid" when present.
Drop special handling for "table=" portions found in URI,
making the code more generic.
Includes testcase.
Fixes#15698 - import geodatabase to postgis via processing
Now it uses the standard QgsVectorLayer.uniqueValues() method
where possible so that provider side optimisations are used
Also add test, and optimise request when using selected
features only
Method was iterating over ever feature in a layer, including
geometries and all attributes for EVERY attribute requested
Add test and refactor so only one optimised iteration (eg no
geometry, only required attributes) is used
All pointer based methods have been removed.
Now we have only:
void setGeometry( const QgsGeometry& geom )
and
QgsGeometry geometry() const
Benefits include avoiding a whole lot of tricky pointer lifetime
issues, potential memory leaks, and finally closing #777, which
has survived for over 9 years!...
Impacts on PyQGIS code:
- no more need for the messy
g = QgsGeometry( feature.geometry() )
workaround, just use g = feature.geometry() instead
- IMPORTANT: you can no longer test whether a feature has geometry
using `if f.geometry():`, since QgsFeature::geometry() will
*always* return an object. Instead, use
`if not f.geometry().isEmpty():`, or preferably the new method
`if not f.hasGeometry():`
Fix#777