[Qgis-developer] have aggregate/window expressions ever been discussed?
regis.haubourg at eau-adour-garonne.fr
Wed May 28 09:02:21 PDT 2014
Hugo Mercier wrote
> Le 27/05/2014 15:03, Régis Haubourg a écrit :
>> Hugo Mercier wrote
>>>> calculated fields in view can't be explicitly cast, so QGIS should have
>>>> guess data type based on a data scan (a major unadressed issue of
>>> Hmmm I wasn't aware of this limitation in SQLITE views :(
>> Yes, SQLITE does dynamic typing, so user or provider has to scan values
>> guess the right type.
>> Here is a sqlite topic on that 
>> And here my initial post in qgis list 
> Still on this topic. I made a few tests with sqlite views.
> Indeed you cannot enforce a particular column type, but :
> * you can convert values with CAST (casting 'foobar' to integer gives
> 0), even if the resulting type is undefined
> * QGIS does not seem to have any particular problem with untyped SQLite
> columns, they will be reported as TEXT (QString) in the layer properties
> * Even if the column is untyped, each value has its own type. So if a
> column results from a CAST, to integer say, then the corresponding
> attribute will be in a QVariant typed as an integer when it is fetched.
> You can then use this value in a QgsExpression or a categorized
> symbology as an integer.
> Am I missing other use cases where not having a column type is a problem ?
> Qgis-developer mailing list
> Qgis-developer at .osgeo
I couldn't achieve that with views in QGIS 1.8, all field cast to numeric
were converted in Qstrings.
View this message in context: http://osgeo-org.1560.x6.nabble.com/have-aggregate-window-expressions-ever-been-discussed-tp5142215p5142949.html
Sent from the Quantum GIS - Developer mailing list archive at Nabble.com.
More information about the Qgis-developer