My layer has an attribute 'name' which is unique for the layer and enforced by the database. I have been looking for an API call that will return a list of features that match the value of the name attribute but can't find anything.
Is there a more efficient way of finding the feature by attribute value than simply iterating over all the features in the layer?
I am guessing not since this implies QGIS maintains some form of index which I doubt!
QgsFeatureRequest
class and requesting a subset of features based on an attribute and/or ignoring the geometry as described in docs.qgis.org/testing/en/docs/pyqgis_developer_cookbook/…