[Qgis-developer] Re: [Qgis-user] Query a joined layer

Nathan Woodrow madmanwoo at gmail.com
Fri Nov 4 08:59:20 EDT 2011


>
> It works if I use the query builder from the attribute table, and will
> select the features that match the query (and highlight them on the
> map/attribute table).


Yeah this will work because it is at a QGIS level.  Not so much a query
rather a "find all the items in the big index in the attribute table".
 QGIS has a model it keeps all the values and fields in, when you use the
search string it just looks everything up in this big index and selects it.
 Never really goes to the provider, not for searching anyway.

 If I use rule based styling I can also select things by attribute and
> style by attribute.


This is on a QGIS level too.  QGIS will check each feature in the current
extent to see if the expression passes, but the expression parser works on
QGIS fields and features (objects) rather then giving the work to the
provider.

If I use the right click menu on the layer with the join and select
> Query... (or Layer > Query... from the menu) this is where it will not
> return any results.


Mainly, like I said above, that QGIS is pretty much saying to the provider
"here is a expression string, filter your dataset and give me back a
filtered set" then provider gets the string with the joined field (that it
doesn't have) and goes "hey! I can't do anything with this.  Have a null
dataset".

IMO would should rename Query to something like Set Subset or Filter (more
conventional).

- Nathan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/qgis-developer/attachments/20111104/927a8f4b/attachment.html


More information about the Qgis-developer mailing list