pgAdmin 4 commit: Refactored code of table and it's child nodes. - Mailing list pgadmin-hackers

From Akshay Joshi
Subject pgAdmin 4 commit: Refactored code of table and it's child nodes.
Date
Msg-id E1iVXih-00070N-3z@gothos.postgresql.org
Whole thread Raw
List pgadmin-hackers
Refactored code of table and it's child nodes.
1) Remove duplicate logic.
2) Child node specific logic should be inside the child node and table node gets the required information from the
respectivechild node. 

Note:- Refactoring of columns node still in progress.

Fixes #4807

Branch
------
master

Details
-------
https://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=de878b3198196f81cd704ef4d385b008892ec16f

Modified Files
--------------
docs/en_US/release_notes_4_16.rst                  |    1 +
.../servers/databases/schemas/tables/__init__.py   |   18 +-
.../schemas/tables/compound_triggers/__init__.py   |  210 +---
.../schemas/tables/compound_triggers/utils.py      |  197 ++++
.../constraints/check_constraint/__init__.py       |  119 +--
.../tables/constraints/check_constraint/utils.py   |  174 ++++
.../constraints/exclusion_constraint/__init__.py   |  150 +--
.../constraints/exclusion_constraint/utils.py      |  215 ++++
.../tables/constraints/foreign_key/__init__.py     |  251 +----
.../tables/constraints/foreign_key/utils.py        |  289 ++++++
.../constraints/index_constraint/__init__.py       |  162 +--
.../tests/default/test_primary_key.json            |    7 +
.../tests/default/test_unique_constraint.json      |    7 +
.../tables/constraints/index_constraint/utils.py   |  233 +++++
.../databases/schemas/tables/indexes/__init__.py   |  215 +---
.../databases/schemas/tables/indexes/utils.py      |  277 ++++++
.../templates/tables/sql/macros/constraints.macro  |   10 +-
.../templates/triggers/sql/pg/10_plus/create.sql   |    1 +
.../templates/triggers/sql/pg/default/create.sql   |    1 +
.../templates/triggers/sql/ppas/10_plus/create.sql |    1 +
.../templates/triggers/sql/ppas/default/create.sql |    1 +
.../databases/schemas/tables/tests/test_utils.py   |    9 -
.../databases/schemas/tables/triggers/__init__.py  |  286 +-----
.../databases/schemas/tables/triggers/utils.py     |  253 +++++
.../servers/databases/schemas/tables/utils.py      | 1036 ++------------------
web/pgadmin/utils/exception.py                     |   25 +-
26 files changed, 1923 insertions(+), 2225 deletions(-)


pgadmin-hackers by date:

Previous
From: Akshay Joshi
Date:
Subject: Re: [pgAdmin][RM4818] Unable to handle loss of connection to server
Next
From: Shubham Agarwal
Date:
Subject: Re: Fixes for pgAdmin feature tests