Feature request #6858
replace the vector query builder with the new expression builder
Status: | Open | ||
---|---|---|---|
Priority: | Normal | ||
Assignee: | Nathan Woodrow | ||
Category: | Vectors | ||
Pull Request or Patch supplied: | No | Resolution: | |
Easy fix?: | No | Copied to github as #: | 15992 |
Description
Nathan I give this to you, but if it is not the case please remove yourself.
The new expression builder seems to have been added in many places (like for example in the WFS client, where anyway it doesn't seems to be able to retrieve layer column values) but not in the vector query builder.
History
#1 Updated by Jürgen Fischer almost 12 years ago
Must these be identical? Providers are not required to support the same syntax than QgsExpression. Some might use similar syntax, but aren't required to match the functionality of QgsExpression (some might only support a subset (eg. OGR on shapes), some a superset (PostgreSQL) and some anything in between). So the help in the expression builder is inaccurate and misleading and the interactive expression evaluation won't work there either.
#2 Updated by Giovanni Manghi almost 12 years ago
Jürgen Fischer wrote:
Must these be identical? Providers are not required to support the same syntax than QgsExpression. Some might use similar syntax, but aren't required to match the functionality of QgsExpression (some might only support a subset (eg. OGR on shapes), some a superset (PostgreSQL) and some anything in between). So the help in the expression builder is inaccurate and misleading and the interactive expression evaluation won't work there either.
so maybe would be better to replace the query builder in the WFS client with the one available now in the vector properties?
#3 Updated by Giovanni Manghi almost 12 years ago
Giovanni Manghi wrote:
Jürgen Fischer wrote:
Must these be identical? Providers are not required to support the same syntax than QgsExpression. Some might use similar syntax, but aren't required to match the functionality of QgsExpression (some might only support a subset (eg. OGR on shapes), some a superset (PostgreSQL) and some anything in between). So the help in the expression builder is inaccurate and misleading and the interactive expression evaluation won't work there either.
so maybe would be better to replace the query builder in the WFS client with the one available now in the vector properties?
or not, I remember that someone was working on adding spatial operators to the expression builder to allow use spatial relations to build queries. I guess it needs the new expression builder.
Well... you devs known what is the right thing to do.
#4 Updated by Jürgen Fischer almost 12 years ago
Giovanni Manghi wrote:
or not, I remember that someone was working on adding spatial operators to the expression builder to allow use spatial relations to build queries. I guess it needs the new expression builder.
yes, the wfs client maps QgsExpressions to the OGC filter syntax - so using the expression builder is the right choice.
#5 Updated by Giovanni Manghi almost 12 years ago
Jürgen Fischer wrote:
Giovanni Manghi wrote:
or not, I remember that someone was working on adding spatial operators to the expression builder to allow use spatial relations to build queries. I guess it needs the new expression builder.
yes, the wfs client maps QgsExpressions to the OGC filter syntax - so using the expression builder is the right choice.
If I'm not wrong the developer (rené-luc) was thinking to add this feature also the expression builder in the vector properties, not only in the wfs client, but I'm not sure now.
#6 Updated by Nathan Woodrow almost 12 years ago
Jürgen Fischer wrote:
Must these be identical? Providers are not required to support the same syntax than QgsExpression. Some might use similar syntax, but aren't required to match the functionality of QgsExpression (some might only support a subset (eg. OGR on shapes), some a superset (PostgreSQL) and some anything in between). So the help in the expression builder is inaccurate and misleading and the interactive expression evaluation won't work there either.
I agree this is the main issue. Something that I have considered is decoupling the expression builder from QgsExpression and allowing it to take just a set of functions in a given format. This would allow us to pass provider functions into the UI and have them listed like they currently are.
#7 Updated by Giovanni Manghi over 11 years ago
The expression builder (with the new spatial function) it is now available in the table of attributes for selections, I guess that it makes even more sense now to have it also to filter features in the query builder.
#8 Updated by Nathan Woodrow over 11 years ago
@Giovanni not a simple task as they are different things. The attribute table is using QgsExpression while the Filter/Query option on the layer is using the providers syntax. In order to support this QgsExpressionBuilder would need to be expanded to support plugable expression engines so that we could pass it a list of functions for the different providers.
I can be done but it would take a bit of effort as you would have to build up a list of functions for each provider.
#9 Updated by Nathan Woodrow over 11 years ago
- Priority changed from Normal to Low
- Target version changed from Version 2.0.0 to Future Release - Nice to have
#10 Updated by Giovanni Manghi over 10 years ago
- Tracker changed from Bug report to Feature request
- Priority changed from Low to Normal
#11 Updated by Giovanni Manghi over 7 years ago
- Easy fix? set to No