[GSoC] Query History Integration with updatable query resultsets and improvements

From: Yosry Muhammad <yosrym93(at)gmail(dot)com>
To: Dave Page <dpage(at)pgadmin(dot)org>
Cc: pgadmin-hackers <pgadmin-hackers(at)postgresql(dot)org>
Subject: [GSoC] Query History Integration with updatable query resultsets and improvements
Date: 2019-08-06 00:16:08
Message-ID: CAFSMqn_huE2n5MFTa+zdV1-vdfX_BraGD7-En1MJM7PBv1RH_Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-hackers

Hi Dave and Hackers,

Please find attached a work-in-progress patch with the following
modifications to the query history:

1- Queries generated by pgAdmin in Save Data operations are now recorded in
query history. This includes transaction control commands such as 'COMMIT,
ROLLBACK, SAVEPOINT, etc.'

2- Queries are now recorded in a correct (mogrified) form after parameters
injection - as opposed to older versions < 4.10. They also appear with the
correct start time (they used to appear with the start time of the
previously executed query - a bug I found).

3- Save Data Queries are visually distinguishable in the query history.

4- Save Data Queries can be shown/hidden from history using a button.

5- Query Tool and View Data now share a common history - this makes more
sense now as data changes can be done from both modes. I had a thought to
remove the Query History from View Data mode entirely, but I thought it
might be useful for some users? I don't know.

I am done with all the functionality code, what is left is the design of
the toggling button/checkbox. For now, I am using an empty button at the
end of the toolbar (next to download button) for experimental purposes.

Do you think a button or a checkbox is more appropriate? If a button, I
would need a design to use. If a checkbox, I am going to need more help as
I am not so good with the design parts. Where should it be placed ( I am
thinking above the list of history entries) ? How should it be styled?

For now, I will start working on tests and documentation updates for this.
Looking forward to your feedback and comments !

P.S I have done a lot of refactoring especially in save_data_changes.py, I
would really appreciate it if someone reviewed these changes.

Thanks!
--
*Yosry Muhammad Yosry*

Computer Engineering student,
The Faculty of Engineering,
Cairo University (2021).
Class representative of CMP 2021.
https://www.linkedin.com/in/yosrym93/

Attachment Content-Type Size
query_history.patch text/x-patch 42.6 KB

Responses

Browse pgadmin-hackers by date

  From Date Subject
Next Message Avin Kavish 2019-08-06 04:11:46 Re: Query Tool Slow to Load
Previous Message Yosry Muhammad 2019-08-05 22:37:25 JavaScript Errors in the Query Tool Leads to a False Message