[QGIS-Developer] Inconsistency between Query builder and Select by query dialogs

Matthias Kuhn matthias at opengis.ch
Sat Sep 16 00:32:21 PDT 2017


Hi all,

For reference I wrote about this here:
https://gis.stackexchange.com/a/212398

A small addition to Andreas' statement "filtering can only be done on
the client", this is no longer entirely the case, a lot of standard SQL
can already be translated and sent to the backend.

It would be possible to adjust the "query builder" - also known as
subsetString - to also work with QgsExpressions.
Pro: increased portability between providers and better "QGIS standard"
compatibility with things like support for variables and python
expression functions
Con: less integration with what some providers (mostly databases) offer
natively (some advanced SQL)
I think there is a need for both, so I could also imagine a radio button
to switch between the two.

Matthias

On 9/15/17 6:26 PM, Andreas Neumann wrote:
>
> Hi Paolo,
>
> I asked the same question, but apparently there are technical reasons.
>
> The Query builder creates a query that a data source can understand
> (e.g. OGR) - data is filtered at its source.
>
> Whereas the expression builder is much, much richer and can't be
> translated to filters of data providers. Thus, such data filtering can
> only be done in the client - means that all features are requested
> from the source and then filtered client side.
>
> I don't know if it would be technically possible to restrict the
> expression builder to a subset that a data provider can understand -
> so that the user can have just one interface, both with a limited set
> of operators and functions.
>
> Andreas
>
>
> On 15.09.2017 18:03, Paolo Cavallini wrote:
>> Hi all,
>> the two dialogs are quite different, whereas they do essentialy the same
>> thing. Questions:
>> * is there a specific reason why the Query builder has not been updated,
>> or is it just the usual lack of time?
>> * is anyone planning to work on this?
>> Thanks.
>>
>>
>> _______________________________________________
>> QGIS-Developer mailing list
>> QGIS-Developer at lists.osgeo.org
>> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
>> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
>
>
>
> _______________________________________________
> QGIS-Developer mailing list
> QGIS-Developer at lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20170916/eee0b777/attachment.html>


More information about the QGIS-Developer mailing list