Re: [Qgis-developer] Question about expression compiling

2016-02-02 Thread Matthias Kuhn
Hi David,

Have you had a look at the class QgsSqlExpressionCompiler? Other SQL
dialects inherit from this class and fine tune it. Most work should
already be done in there so you just have to take care of the failing tests.

https://github.com/qgis/QGIS/blob/master/src/core/qgssqlexpressioncompiler.cpp

Matthias

On 02/03/2016 12:01 AM, David Adler wrote:
> We are working on the DB2 expression compiler and testing it with a
> Python driver.
>
> For an expression like NAME IS NULL
> What should be the node type of NULL?  It appears to be
> QgsExpression::ntLiteral but it doesn't seem to have a valid value and
> fails the call to quotedValue().
>
> For now we are using a hack to check if n->dump() == NULL and treating
> it as a special case.
>
> Also, I assume that ILIKE is a case insensitive LIKE.
>
> ---
> This email has been checked for viruses by Avast antivirus software.
> https://www.avast.com/antivirus
>
> ___
> Qgis-developer mailing list
> Qgis-developer@lists.osgeo.org
> List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer

-- 
Matthias Kuhn
OPENGIS.ch - https://www.opengis.ch
Spatial • (Q)GIS • PostGIS • Open Source




signature.asc
Description: OpenPGP digital signature
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer

[Qgis-developer] Question about expression compiling

2016-02-02 Thread David Adler
We are working on the DB2 expression compiler and testing it with a 
Python driver.


For an expression like NAME IS NULL
What should be the node type of NULL?  It appears to be 
QgsExpression::ntLiteral but it doesn't seem to have a valid value and 
fails the call to quotedValue().


For now we are using a hack to check if n->dump() == NULL and treating 
it as a special case.


Also, I assume that ILIKE is a case insensitive LIKE.

---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus

___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer