You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With a constantly growing set of data provider supporting the connections API we are now in the position to start the implementation directly in the browser of another group of functionalities that are currently available in DB-Manager, the functionality we intend to port include most of the table management capabilities:
creation of new tables
creation of new fields
removal of existing fields
Motivation
This work is being prompted by:
The desire to provide an alternative to the regressions frequently encountered in the db manager plugin (due mostly to the nature of the Python language and the inherent difficulties in creating stable, regression-free larger projects in Python).
Providing a more unified QGIS experience with database and layer management. Currently we have two completely distinct interfaces for managing databases and tables (db manager and browser). One of the long-term goals for the QGIS project is to remedy this situation by moving the functionality from db manager into the browser panel, so that QGIS offers a single place for users to performance these tasks.
Removal of duplicate code. The db manager plugin uses a lot of code which duplicates code already present in the QGIS c++ libraries. While the db manager code only has a limited test coverage, the c++ versions of this code are extremely well tested and have proved to be regression-free over recent releases. Duplicate code also adds "technical debt" and management burden to the QGIS project.
Creation of new tables
The creation of new table will be available through the context menu of an existing connection from the browser tree.
The dialog will allow to add fields, choose the SRID, geometry type etc.
The new table creation dialog will use the same provider level metadata exposed through QGIS which is currently used when adding new fields to a table. This will provide consistency for the offered field types across the QGIS interface for the different providers. Currently, db manager's "Create Table" functionality uses a duplicate copy of this code which only offers a small subset of the field types possible to create on each provider.
Creation of new fields
The creation of new fields will be available through the context menu of an existing table from the browser tree.
The dialog will allow to add a field.
Removal of existing fields
The removal of fields will be possible through the context menu of an existing table from the browser tree.
The dialog will allow to choose the field to remove (primary key fields and geometry fields will not be available for removal).
A confirmation dialog will ask the user to proceed with the actual removal.
(TBD: support for changing field types or field lengths??)
GUI Considerations
TBD: do we expose fields in the browser tree view (pgadmin style!).
Advantages:
avoids a double-nested modal dialog ("edit fields" -> "edit field")
Performance Implications
None
Further Considerations/Improvements
(optional)
Backwards Compatibility
None
Issue Tracking ID(s)
None
Votes
(required)
The text was updated successfully, but these errors were encountered:
QGIS Enhancement: Port DB Manager Table Management Functionalities to Browser (part 2)
Date 2020/05/07
Author Alessandro Pasotti (@elpaso), Nyall Dawson (@nyalldawson)
Contact elpaso dot itopen dot it, nyall dot dawson at gmail dot com
maintainer @elpaso
Version QGIS 3.16.0
Summary
With a constantly growing set of data provider supporting the connections API we are now in the position to start the implementation directly in the browser of another group of functionalities that are currently available in DB-Manager, the functionality we intend to port include most of the table management capabilities:
Motivation
This work is being prompted by:
The desire to provide an alternative to the regressions frequently encountered in the db manager plugin (due mostly to the nature of the Python language and the inherent difficulties in creating stable, regression-free larger projects in Python).
Providing a more unified QGIS experience with database and layer management. Currently we have two completely distinct interfaces for managing databases and tables (db manager and browser). One of the long-term goals for the QGIS project is to remedy this situation by moving the functionality from db manager into the browser panel, so that QGIS offers a single place for users to performance these tasks.
Removal of duplicate code. The db manager plugin uses a lot of code which duplicates code already present in the QGIS c++ libraries. While the db manager code only has a limited test coverage, the c++ versions of this code are extremely well tested and have proved to be regression-free over recent releases. Duplicate code also adds "technical debt" and management burden to the QGIS project.
Creation of new tables
The creation of new table will be available through the context menu of an existing connection from the browser tree.
The dialog will allow to add fields, choose the SRID, geometry type etc.
The new table creation dialog will use the same provider level metadata exposed through QGIS which is currently used when adding new fields to a table. This will provide consistency for the offered field types across the QGIS interface for the different providers. Currently, db manager's "Create Table" functionality uses a duplicate copy of this code which only offers a small subset of the field types possible to create on each provider.
Creation of new fields
The creation of new fields will be available through the context menu of an existing table from the browser tree.
The dialog will allow to add a field.
Removal of existing fields
The removal of fields will be possible through the context menu of an existing table from the browser tree.
The dialog will allow to choose the field to remove (primary key fields and geometry fields will not be available for removal).
A confirmation dialog will ask the user to proceed with the actual removal.
(TBD: support for changing field types or field lengths??)
GUI Considerations
TBD: do we expose fields in the browser tree view (pgadmin style!).
Advantages:
Performance Implications
None
Further Considerations/Improvements
(optional)
Backwards Compatibility
None
Issue Tracking ID(s)
None
Votes
(required)
The text was updated successfully, but these errors were encountered: