pgAdmin 4 commit: Refactored code of table and it's child nodes.

From: Akshay Joshi <akshay(dot)joshi(at)enterprisedb(dot)com>
To: pgadmin-hackers(at)lists(dot)postgresql(dot)org
Subject: pgAdmin 4 commit: Refactored code of table and it's child nodes.
Date: 2019-11-15 09:16:47
Message-ID: E1iVXih-00070N-3z@gothos.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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 respective child 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(-)

Browse pgadmin-hackers by date

  From Date Subject
Next Message Shubham Agarwal 2019-11-15 12:29:12 Re: Fixes for pgAdmin feature tests
Previous Message Akshay Joshi 2019-11-15 09:04:43 Re: [pgAdmin][RM4818] Unable to handle loss of connection to server