[gdal-dev] determine default SQL dialect

Michael Sumner mdsumner at gmail.com
Tue Aug 2 12:32:38 PDT 2022


Excellent, thanks very much.

Best, Mike

On Wed, 3 Aug 2022, 02:30 Even Rouault, <even.rouault at spatialys.com> wrote:

>
> 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.
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20220803/e320b2ce/attachment.htm>


More information about the gdal-dev mailing list