RM #1250 Collection node counts

From: Akshay Joshi <akshay(dot)joshi(at)enterprisedb(dot)com>
To: pgadmin-hackers <pgadmin-hackers(at)postgresql(dot)org>
Subject: RM #1250 Collection node counts
Date: 2016-08-08 10:39:17
Message-ID: CANxoLDd4-bmH9jtT1Ki4MD3kBmt15MF2yOWsa7LyGWcgo-kGzQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-hackers

Hi All

I have fixed the RM#1250 "Collection node counts". To fix this RM I need to
do following changes

- Move "check_precondition" function from module's view class to global
level within that python file itself, so that module class will use it.
- Modified "get_nodes" function of each module's class, run the sql
query to count the number of objects and pass the count to
"generate_browser_collection_node" function to display the collection count.
- Reuse SQL queries which is used to fetch nodes. Make that query as
inner query like "SELECT count(*) FROM( <node's> query ) AS
collection_count". For that I'll have to remove semicolon's from some of
the SQL queries.

One case is not handled with this patch and that is on "Refresh" of
collection node, count is not updated. If user refresh the parent node then
it will be updated. I'll create a separate RM for that.

Attached is the patch file. Please review it and let me know the review
comments.

--
*Akshay Joshi*
*Principal Software Engineer *

*Phone: +91 20-3058-9517Mobile: +91 976-788-8246*

Attachment Content-Type Size
RM_1250.patch application/octet-stream 172.5 KB

Responses

Browse pgadmin-hackers by date

  From Date Subject
Next Message Dave Page 2016-08-08 10:59:39 pgAdmin 4 commit: Prevent the user attempting to run external commands
Previous Message Dave Page 2016-08-08 09:16:32 Re: [pgAdmin 4 - Bug #1523] Messages pane showing incomplete info