Run an SQL statement against a dataset
Value
A GDALLayer holding the result set, or NULL for a statement that
returns none. The result set is released when the layer is garbage
collected, or when the dataset is closed.
Examples
ds <- gdal_open(system.file("extdata/test.gpkg", package = "GDAL7"))
read_vector(execute_sql(ds, "SELECT name FROM places WHERE population > 1e6"))
#> OGC_FID name
#> 1 1 Melbourne
#> 2 2 Sydney
#> 3 3 Perth
gdal_close(ds)