[gdal-dev] determine default SQL dialect

Even Rouault even.rouault at spatialys.com
Tue Aug 2 09:30:30 PDT 2022


Le 02/08/2022 à 18:25, Even Rouault a écrit :
>
> Le 02/08/2022 à 09:42, Michael Sumner a écrit :
>> Is it possible to determine the default SQL dialect  that will be 
>> used in the C++ API?
>
> Short answer: no
>
> Long answer: for a driver that is backed by a SQL engine (SQLite, 
> GPKG, PG, MySQL, OCI, etc.), it will default to the RDBMS SQL engine, 
> otherwise to OGR SQL.

Potential not so pretty way of knowing if the default SQL dialect is OGR 
SQL:

run ExecuteSQL( "SELECT OGR_GEOM_WKT FROM {some_layer_name}" )

if that works, then at 99.99% , you have OGR SQL.

Even

-- 
http://www.spatialys.com
My software is free, but my time generally not.



More information about the gdal-dev mailing list