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
....
Previously these would be silently dropped from the layers, but
we now have comprehensive support for binary fields and should
expose them.
Fix sponsored by WhereGroup
This provider option was linked to the project level option
"Trust layer metadata..." which was implemented
to speed up loading of large dataset by trusting extent
read from metadata to avoid costly operations to determine
the layer extent.
Check PK unicity on the other hand has only effect on views
and query layers and it is useful as an independent
option to prevent loading of layers that have no PK (or the
wrong one).
But the operation of determine unicity of a values in a column
can also be costly, so better to get control back to the user.
Legacy default is preserved (the project-level "Trust..." option).
Fixes#21839
Funded by RAAB.nl
There is still an old issue: views are only available
through DB manager.
Fixes#20674 - again
- Life is really simple, but we insist on making it complicated.
Confucius
Instead of using 'SDO_UTIL.FROM_WKTGEOMETRY' to generate `SDO_GEOMETRY` object
for Point, the `testdata` generate Point and MultiPoint with `SDO_POINT_TYPE`
or `SDO_ELEM_INFO_ARRAY` and `SDO_ORDINATE_ARRAY`.
With this way of creating Point and MultiPoint, we can test the way Point and
MultiPoint are converting to WKB.
I wanted to add the test for gpkg subsetstring even if
it was not bugged, while testing that, I hit an assert
in Qt core that pointed me to double unlocked locks.