PostgreSQL bigint primary keys are no longer cast to text on
queries/updates. Internally we keep a FID map between the real database
value and the internal QGIS feature ID. Thus, we preserve the QGIS
semantics of using negative FIDs for newly added features, while still
allowing users to edit attributes whose PKs are bigint non-positive.
On PostgreSQL tables whose primary keys are of type bigint/bigserial,
QGIS used to cast the primary keys to text, causing the database to do
bigint::text castas and full table scans instead of using the indices,
causing in turn slowness on updates and other queries.
This fix creates a new QgsPostgresPrimaryKeyType, PktInt64. PostgreSQL
don't know about unsigned types, so the PK type PktUint64 loses sense.
Knowing that the PK is an integer type, QGIS won't cast it to text
anymore, thus enabling the correct use of database indices.
Instead of forcing a quasi-random ordering of inputs for models,
this commit exposes a new "Reorder Model Inputs" option in the model
designer which allows users control over the exact order of
inputs to show users for their model.
No more illogical ordering like showing a field choice before the
layer choice it's based on!
Sponsored by NaturalGIS
Also:
- enables saving/loading of layer definition files (.qlr) with vector tile layers.
- makes fields of vector tile layers sorted so they are easier to navigate
This new qgis_transform tool allows users to run processing algorithms
(both built-in, and those provided by plugins) directly from the console.
Running:
- "qgis_transform list" will output a complete list of all available
algorithms, grouped by provider.
- "qgis_transform plugins" lists available and activated plugins which
advertise the hasProcessingProvider metadata option (only these plugins
are loaded by the tool)
- "qgis_transform help algid" outputs the help and input descriptions
for the specified algorithm, e.g. "qgis_transform help native:centroids"
"qgis_transform run": runs an algorithm. Parameters are specified by a
"--param=value" syntax. E.g.
qgis_transform run native:centroids --INPUT="my_shapefile.shp" --OUTPUT="centroids.kml"
or
qgis_transform run native:buffer --INPUT=/home/me/my.shp --DISTANCE=20 --OUTPUT=/home/me/buffered.shp
While running an algorithm a text-based feedback bar is shown, and the
operation can be cancelled via CTRL+C
Sponsored by the Swedish User Group