QGIS Algorithm provided by QGIS Execute SQL (qgis:executesql). Runs a simple or complex query with SQL syntax. Input data sources are identified with input1, input2, ..., inputN and a simple query will look like: SELECT * FROM input1 The result of the query will be added as a new layer.
qgis_executesql(
INPUT_DATASOURCES = qgisprocess:::qgis_default_value(),
INPUT_QUERY = qgisprocess:::qgis_default_value(),
INPUT_UID_FIELD = qgisprocess:::qgis_default_value(),
INPUT_GEOMETRY_FIELD = qgisprocess:::qgis_default_value(),
INPUT_GEOMETRY_TYPE = qgisprocess:::qgis_default_value(),
INPUT_GEOMETRY_CRS = qgisprocess:::qgis_default_value(),
OUTPUT = qgisprocess:::qgis_default_value(),
...,
.complete_output = .complete_output_option(),
.quiet = .quiet_option(),
.messages = .message_option()
)
multilayer
- Input data sources (called input1, .., inputN in the query). .
execute_sql
- SQL query. .
string
- Unique identifier field. String value. field:FIELD_NAME to use a data defined value taken from the FIELD_NAME field. expression:SOME EXPRESSION to use a data defined value calculated using a custom QGIS expression.
string
- Geometry field. String value. field:FIELD_NAME to use a data defined value taken from the FIELD_NAME field. expression:SOME EXPRESSION to use a data defined value calculated using a custom QGIS expression.
enum
of ("Autodetect", "No geometry", "Point", "LineString", "Polygon", "MultiPoint", "MultiLineString", "MultiPolygon")
- Geometry type. Number of selected option, e.g. '1'. Comma separated list of options, e.g. '1,3'.
crs
- CRS. CRS as an auth ID (e.g. 'EPSG:3111'). CRS as a PROJ4 string (e.g. 'PROJ4:…'). CRS as a WKT string (e.g. 'WKT:…'). Path to a layer. The CRS of the layer is used..
sink
- SQL Output. Path for new vector layer.
further parameters passed to qgisprocess::qgis_run_algorithm()
logical specifying if complete out of qgisprocess::qgis_run_algorithm()
should be used (TRUE
) or first output (most likely the main) should read (FALSE
). Default value is TRUE
.
logical specifying if parameter .quiet
for qgisprocess::qgis_run_algorithm()
Default value is TRUE
.
logical specifying if messages from qgisprocess::qgis_run_algorithm()
should be printed (TRUE
) or not (FALSE
). Default value is FALSE
.