This is the implementation of the new DB connections API (grant proposal 2019).
Summary
The new API makes it available to QGIS core a new interface for provider connections and will allow to:
replace the provider specific QgsSettings management in QGIS4 (save/load connections from the settings) NOT IN SCOPE FOR NOW.
provide a unified API for common operations on DB connections:
executeSql and get the results
list tables names and properties and schemas
create a new vector table (no rasters for now)
create/rename/drop schemas and tables
vacuum
....
each new algorithm execution
Avoids the situation where errors reported during an algorithm
which was overall successully executed are append to the errors
for later execution steps
Instead, record errors and report them all at the end of the batch
process. If we abort the remaining batch steps when encountering any
error, this blocks a useful use of the batch mode and prevents users
from running a batch process over a large number of input files, some
of which may be invalid.
to handle creation of parameter definition widgets
Previously, these configuration widgets were all hardcoded into the Python modeler
dialog. This prevented 3rd party, plugin provided, parameters from ever being full
first class citizens in QGIS, as there was no way to allow their use as inputs to
user created models to be customised.
Now, the registry is responsible for creating the configuration widget, allowing
for 3rd party parameter types to provide their own customised configuration
widgets.
Refs #26493
This change makes it easier to subclass `Grass7AlgorithProvider` which
allows e.g. to expose GRASS Addons as QGIS plugins.
Disclaimer: `Grass7AlgorithProvider` is a private API and it may change
without warning. 3rd parties that rely on this should expect
that their code will break in future releases.
For more info please check the comments at #30252
Nevertheless, it currently is possible to subclass with something like this:
class CustomGrassBasedProvider(Grass7AlgorithmProvider):
# Set descriptionFolder to our own description directory
descriptionFolder = os.path.join(os.path.dirname(__file__), 'description')
# 3rd party plugins don't need an activation/deactivation setting
activateSetting = None
# define the rest of the methods that are needed (e.g. name(), id() etc)
# ...
Fixes#30241
Continues #9202
Larger values may speed up the rendering and provide better labelling (fewer gaps without labels)
at the expense of using more memory.
Ported from XYZ Tiles plugin - originally contributed by @nurenda