Thread: [pgAdmin4] RM5965 Couldn't download file of Marcos query results
Hi Hackers,
--
Please find the attached patch which resolves the issue of macros query results download, have used async cursor to achieve this functionality, where for downloading the results, cursor is scrolled back to 0 and end of the records, and reset again while user scrolling on Data Output table.
QA/Reviewer needs to observe below issues if it occurs:
- If records are more like 5000 or 10000, try to fetch records by scrolling at least (2000), now save the results by clicking the download button, it should save the file, and now try scrolling again, the data should be shown continuously and not any abrupt end or unexpected records order.
- Also, the download button is now "Save results to CSV/TXT" where it will only get enabled when there are valid records in the Data Output.
Also a minor fix of the add folder icon issue is also added into this patch.
Rahul Shirsat
Senior Software Engineer | EnterpriseDB Corporation.
Attachment
Hi Hackers,
Please find the updated patch below.
On Mon, Dec 7, 2020 at 2:55 PM Rahul Shirsat <rahul.shirsat@enterprisedb.com> wrote:
Hi Hackers,Please find the attached patch which resolves the issue of macros query results download, have used async cursor to achieve this functionality, where for downloading the results, cursor is scrolled back to 0 and end of the records, and reset again while user scrolling on Data Output table.QA/Reviewer needs to observe below issues if it occurs:
- If records are more like 5000 or 10000, try to fetch records by scrolling at least (2000), now save the results by clicking the download button, it should save the file, and now try scrolling again, the data should be shown continuously and not any abrupt end or unexpected records order.
- Also, the download button is now "Save results to CSV/TXT" where it will only get enabled when there are valid records in the Data Output.
Also a minor fix of the add folder icon issue is also added into this patch.--Rahul ShirsatSenior Software Engineer | EnterpriseDB Corporation.
Rahul Shirsat
Software Engineer | EnterpriseDB Corporation.
Attachment
Hi Aditya
Can you please review this patch?
On Mon, Dec 7, 2020 at 3:10 PM Rahul Shirsat <rahul.shirsat@enterprisedb.com> wrote:
Hi Hackers,Please find the updated patch below.On Mon, Dec 7, 2020 at 2:55 PM Rahul Shirsat <rahul.shirsat@enterprisedb.com> wrote:Hi Hackers,Please find the attached patch which resolves the issue of macros query results download, have used async cursor to achieve this functionality, where for downloading the results, cursor is scrolled back to 0 and end of the records, and reset again while user scrolling on Data Output table.QA/Reviewer needs to observe below issues if it occurs:
- If records are more like 5000 or 10000, try to fetch records by scrolling at least (2000), now save the results by clicking the download button, it should save the file, and now try scrolling again, the data should be shown continuously and not any abrupt end or unexpected records order.
- Also, the download button is now "Save results to CSV/TXT" where it will only get enabled when there are valid records in the Data Output.
Also a minor fix of the add folder icon issue is also added into this patch.--Rahul ShirsatSenior Software Engineer | EnterpriseDB Corporation.--Rahul ShirsatSoftware Engineer | EnterpriseDB Corporation.
Thanks & Regards
Akshay Joshi
pgAdmin Hacker | Principal Software Architect
EDB PostgresMobile: +91 976-788-8246
Hello Rahul,
Found below issues:
1) The data grid is not fetching more than 1000 records now, gives a console error:
sqleditor.js:1264 Uncaught TypeError: self.enable_disable_download_btn is not a function
at child.fetch_next (sqleditor.js:1264)
at child.fetch_next (sqleditor.js:1264)
2) The sqleditor test cases are failing.
3) Fix pep8 issues.
4) Fix linter issues.
5) Please check the doc changes again, it's not clear to me.
I didn't check but make sure the GUI tests for the sqleditor runs fine since the behaviour has changed now.
On Wed, Dec 9, 2020 at 1:53 PM Akshay Joshi <akshay.joshi@enterprisedb.com> wrote:
Hi AdityaCan you please review this patch?On Mon, Dec 7, 2020 at 3:10 PM Rahul Shirsat <rahul.shirsat@enterprisedb.com> wrote:Hi Hackers,Please find the updated patch below.On Mon, Dec 7, 2020 at 2:55 PM Rahul Shirsat <rahul.shirsat@enterprisedb.com> wrote:Hi Hackers,Please find the attached patch which resolves the issue of macros query results download, have used async cursor to achieve this functionality, where for downloading the results, cursor is scrolled back to 0 and end of the records, and reset again while user scrolling on Data Output table.QA/Reviewer needs to observe below issues if it occurs:
- If records are more like 5000 or 10000, try to fetch records by scrolling at least (2000), now save the results by clicking the download button, it should save the file, and now try scrolling again, the data should be shown continuously and not any abrupt end or unexpected records order.
- Also, the download button is now "Save results to CSV/TXT" where it will only get enabled when there are valid records in the Data Output.
Also a minor fix of the add folder icon issue is also added into this patch.--Rahul ShirsatSenior Software Engineer | EnterpriseDB Corporation.--Rahul ShirsatSoftware Engineer | EnterpriseDB Corporation.--Thanks & RegardsAkshay JoshipgAdmin Hacker | Principal Software ArchitectEDB PostgresMobile: +91 976-788-8246
Thanks,
Aditya Toshniwal
pgAdmin hacker | Sr. Software Engineer | edbpostgres.com
"Don't Complain about Heat, Plant a TREE"
Hi Aditya/Akshay,
On Wed, Dec 9, 2020 at 2:59 PM Aditya Toshniwal <aditya.toshniwal@enterprisedb.com> wrote:
Hello Rahul,Found below issues:1) The data grid is not fetching more than 1000 records now, gives a console error:sqleditor.js:1264 Uncaught TypeError: self.enable_disable_download_btn is not a function
at child.fetch_next (sqleditor.js:1264)
Fixed
2) The sqleditor test cases are failing.
This has been taken care of, and added more test cases.
3) Fix pep8 issues.4) Fix linter issues.
Sorry for these issues, last minute code changes 😣
5) Please check the doc changes again, it's not clear to me.
This has been corrected now.
I didn't check but make sure the GUI tests for the sqleditor runs fine since the behaviour has changed now.
These are fixed now.
On Wed, Dec 9, 2020 at 1:53 PM Akshay Joshi <akshay.joshi@enterprisedb.com> wrote:Hi AdityaCan you please review this patch?On Mon, Dec 7, 2020 at 3:10 PM Rahul Shirsat <rahul.shirsat@enterprisedb.com> wrote:Hi Hackers,Please find the updated patch below.On Mon, Dec 7, 2020 at 2:55 PM Rahul Shirsat <rahul.shirsat@enterprisedb.com> wrote:Hi Hackers,Please find the attached patch which resolves the issue of macros query results download, have used async cursor to achieve this functionality, where for downloading the results, cursor is scrolled back to 0 and end of the records, and reset again while user scrolling on Data Output table.QA/Reviewer needs to observe below issues if it occurs:
- If records are more like 5000 or 10000, try to fetch records by scrolling at least (2000), now save the results by clicking the download button, it should save the file, and now try scrolling again, the data should be shown continuously and not any abrupt end or unexpected records order.
- Also, the download button is now "Save results to CSV/TXT" where it will only get enabled when there are valid records in the Data Output.
Also a minor fix of the add folder icon issue is also added into this patch.--Rahul ShirsatSenior Software Engineer | EnterpriseDB Corporation.--Rahul ShirsatSoftware Engineer | EnterpriseDB Corporation.--Thanks & RegardsAkshay JoshipgAdmin Hacker | Principal Software ArchitectEDB PostgresMobile: +91 976-788-8246--Thanks,Aditya ToshniwalpgAdmin hacker | Sr. Software Engineer | edbpostgres.com"Don't Complain about Heat, Plant a TREE"
Rahul Shirsat
Software Engineer | EnterpriseDB Corporation.
Attachment
Hi Rahul,
@committer - Please remove the file web/regression/javascript/sqleditor/query_tool_preferences.js before committing.
Apart from this, the patch looks good to me.
On Thu, Dec 10, 2020 at 6:55 PM Rahul Shirsat <rahul.shirsat@enterprisedb.com> wrote:
Hi Aditya/Akshay,On Wed, Dec 9, 2020 at 2:59 PM Aditya Toshniwal <aditya.toshniwal@enterprisedb.com> wrote:Hello Rahul,Found below issues:1) The data grid is not fetching more than 1000 records now, gives a console error:sqleditor.js:1264 Uncaught TypeError: self.enable_disable_download_btn is not a function
at child.fetch_next (sqleditor.js:1264)Fixed2) The sqleditor test cases are failing.This has been taken care of, and added more test cases.3) Fix pep8 issues.4) Fix linter issues.Sorry for these issues, last minute code changes 😣5) Please check the doc changes again, it's not clear to me.This has been corrected now.I didn't check but make sure the GUI tests for the sqleditor runs fine since the behaviour has changed now.These are fixed now.On Wed, Dec 9, 2020 at 1:53 PM Akshay Joshi <akshay.joshi@enterprisedb.com> wrote:Hi AdityaCan you please review this patch?On Mon, Dec 7, 2020 at 3:10 PM Rahul Shirsat <rahul.shirsat@enterprisedb.com> wrote:Hi Hackers,Please find the updated patch below.On Mon, Dec 7, 2020 at 2:55 PM Rahul Shirsat <rahul.shirsat@enterprisedb.com> wrote:Hi Hackers,Please find the attached patch which resolves the issue of macros query results download, have used async cursor to achieve this functionality, where for downloading the results, cursor is scrolled back to 0 and end of the records, and reset again while user scrolling on Data Output table.QA/Reviewer needs to observe below issues if it occurs:
- If records are more like 5000 or 10000, try to fetch records by scrolling at least (2000), now save the results by clicking the download button, it should save the file, and now try scrolling again, the data should be shown continuously and not any abrupt end or unexpected records order.
- Also, the download button is now "Save results to CSV/TXT" where it will only get enabled when there are valid records in the Data Output.
Also a minor fix of the add folder icon issue is also added into this patch.--Rahul ShirsatSenior Software Engineer | EnterpriseDB Corporation.--Rahul ShirsatSoftware Engineer | EnterpriseDB Corporation.--Thanks & RegardsAkshay JoshipgAdmin Hacker | Principal Software ArchitectEDB PostgresMobile: +91 976-788-8246--Thanks,Aditya ToshniwalpgAdmin hacker | Sr. Software Engineer | edbpostgres.com"Don't Complain about Heat, Plant a TREE"--Rahul ShirsatSoftware Engineer | EnterpriseDB Corporation.
Thanks,
Aditya Toshniwal
pgAdmin hacker | Sr. Software Engineer | edbpostgres.com
"Don't Complain about Heat, Plant a TREE"
Thanks, patch applied.
On Mon, Dec 14, 2020 at 11:55 AM Aditya Toshniwal <aditya.toshniwal@enterprisedb.com> wrote:
Hi Rahul,The file in the patch - web/regression/javascript/sqleditor/query_tool_preferences.js is a copy of web/pgadmin/static/js/sqleditor/query_tool_preferences.js and is not a test case file.
@committer - Please remove the file web/regression/javascript/sqleditor/query_tool_preferences.js before committing.Apart from this, the patch looks good to me.On Thu, Dec 10, 2020 at 6:55 PM Rahul Shirsat <rahul.shirsat@enterprisedb.com> wrote:Hi Aditya/Akshay,On Wed, Dec 9, 2020 at 2:59 PM Aditya Toshniwal <aditya.toshniwal@enterprisedb.com> wrote:Hello Rahul,Found below issues:1) The data grid is not fetching more than 1000 records now, gives a console error:sqleditor.js:1264 Uncaught TypeError: self.enable_disable_download_btn is not a function
at child.fetch_next (sqleditor.js:1264)Fixed2) The sqleditor test cases are failing.This has been taken care of, and added more test cases.3) Fix pep8 issues.4) Fix linter issues.Sorry for these issues, last minute code changes 😣5) Please check the doc changes again, it's not clear to me.This has been corrected now.I didn't check but make sure the GUI tests for the sqleditor runs fine since the behaviour has changed now.These are fixed now.On Wed, Dec 9, 2020 at 1:53 PM Akshay Joshi <akshay.joshi@enterprisedb.com> wrote:Hi AdityaCan you please review this patch?On Mon, Dec 7, 2020 at 3:10 PM Rahul Shirsat <rahul.shirsat@enterprisedb.com> wrote:Hi Hackers,Please find the updated patch below.On Mon, Dec 7, 2020 at 2:55 PM Rahul Shirsat <rahul.shirsat@enterprisedb.com> wrote:Hi Hackers,Please find the attached patch which resolves the issue of macros query results download, have used async cursor to achieve this functionality, where for downloading the results, cursor is scrolled back to 0 and end of the records, and reset again while user scrolling on Data Output table.QA/Reviewer needs to observe below issues if it occurs:
- If records are more like 5000 or 10000, try to fetch records by scrolling at least (2000), now save the results by clicking the download button, it should save the file, and now try scrolling again, the data should be shown continuously and not any abrupt end or unexpected records order.
- Also, the download button is now "Save results to CSV/TXT" where it will only get enabled when there are valid records in the Data Output.
Also a minor fix of the add folder icon issue is also added into this patch.--Rahul ShirsatSenior Software Engineer | EnterpriseDB Corporation.--Rahul ShirsatSoftware Engineer | EnterpriseDB Corporation.--Thanks & RegardsAkshay JoshipgAdmin Hacker | Principal Software ArchitectEDB PostgresMobile: +91 976-788-8246--Thanks,Aditya ToshniwalpgAdmin hacker | Sr. Software Engineer | edbpostgres.com"Don't Complain about Heat, Plant a TREE"--Rahul ShirsatSoftware Engineer | EnterpriseDB Corporation.--Thanks,Aditya ToshniwalpgAdmin hacker | Sr. Software Engineer | edbpostgres.com"Don't Complain about Heat, Plant a TREE"
Thanks & Regards
Akshay Joshi
pgAdmin Hacker | Principal Software Architect
EDB PostgresMobile: +91 976-788-8246