[Qgis-developer] Aggregates within expression engine

Régis Haubourg regis.haubourg at eau-adour-garonne.fr
Mon Mar 21 02:12:23 PDT 2016


Hi, 
Hi, I remember having had such a discussion with Hugo and matthias when
choosing what could be the best way for doing aggregates and relational
queries in QGIS. 

At that time, we chose to test virtual layers path because all database
query planner stuff seemed too much work to recode in QGIS core, and because
demand from French ministry was to allow users to do advanced relational
queries without having a full DB (many users are not granted to do that in
by organisations). 
Anyway, I agree with Paolo that query layers certainly are for advanced SQL
users, and are clearly not a straightfull path just to compute a max value
in an expression engine.. 

I have two concerns: 

 1 - Having aggregate functions in expressions would be very handy. What I
fear is that having expressions syntaxes between two worlds could be strange
for new comers. "CASE WHEN" instead of "if(condition, value)" but aggregate
expression instead of GROUP BY... Don't you feel so? Should we offer both
syntax for SQL fans and spreadsheet fans (with some info in documentation
panel pointing that both expressions are equivalent) ?

Anyway, any of the two syntaxes wil still be clearer than having to put a VB
code bloc like in Arcgis :) 

 2 -Question for the future: Is aggregates with expression the beginning of
a relational engine in QGIS? If yes, what should be the future for virtual
layers? Still use SQLITE with its pros and cons, or switch to a pure core
API (less caveats, but lot of work for sure)? 

Thoughts? 


Cheers
Régis




--
View this message in context: http://osgeo-org.1560.x6.nabble.com/Aggregates-within-expression-engine-tp5256639p5257591.html
Sent from the Quantum GIS - Developer mailing list archive at Nabble.com.


More information about the Qgis-developer mailing list