Feature request #8594

executeQuery on data provider

Added by Nathan Woodrow almost 8 years ago. Updated almost 4 years ago.

Status:Open
Priority:Normal
Assignee:-
Category:Unknown
Pull Request or Patch supplied:No Resolution:
Easy fix?:No Copied to github as #:17336

Description

It would be handy to be able to do executeQuery which would just pass the query to the provider and return a iterator of features.

Would allow for something like this:


provider = layer.dataProvider()
features = provider.executeQuery("Select * FROM blah WHERE A = 100")
for f in features:
   ... 

This would be handy to allow to more advanced queries against a provider and letting QGIS handle all the QgsFeature creation.

History

#1 Updated by Jürgen Fischer about 7 years ago

  • Tracker changed from Bug report to Feature request

#2 Updated by Giovanni Manghi about 4 years ago

  • Easy fix? set to No

#3 Updated by Jürgen Fischer almost 4 years ago

  • Category set to Unknown

Also available in: Atom PDF