[gdal-dev] determine default SQL dialect

Nyall Dawson nyall.dawson at gmail.com
Tue Aug 2 20:35:40 PDT 2022


On Wed, 3 Aug 2022 at 02:25, Even Rouault <even.rouault at spatialys.com> wrote:
>
>
> 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.

Related PR here: https://github.com/OSGeo/gdal/pull/6154, adding a new
GDAL_DMD_SUPPORTED_SQL_DIALECTS driver metadata string.

Feedback is welcome!

Nyall

>
> >
> > It seems like the logic to pivot on dialect choice is only available
> > to drivers internally (they know if they have one), so a map of
> > formats is enough - but I wonder if I'm missing an API hook.
> >
> > Also, there appears to be dialect values DEBUG, INDIRECT_SQLITE,
> > MONGO_DB, and ES in use but I gather they are for internal use (and so
> > properly don't appear in the documentation).
>
> DEBUG is clearly for internal use (autotest). INDIRECT_SQLITE is
> documented at
> https://gdal.org/user/sql_sqlite_dialect.html?highlight=indirect_sqlite.
> The others are documented in the respective documentation driver pages
>
> Even
>
>
> --
> http://www.spatialys.com
> My software is free, but my time generally not.
>
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/gdal-dev


More information about the gdal-dev mailing list