Commit Graph

44 Commits

Author SHA1 Message Date
Khushboo Vashi
5e0daccf76 Added support for psycopg3 along with psycopg2. #5011 2023-02-15 11:31:29 +05:30
Akshay Joshi
98184e5835 Update copyright notices for 2023 2023-01-02 11:53:55 +05:30
Mark Mayo
41508f7f67
python 3 updates
- Fix super() calls for python 3
- No need to inherit objects.
- No need for u at the start of strings
- Tidied up some brackets and f-strings too
2022-11-19 10:13:41 +05:30
Yogesh Mahajan
cbf5886430 Fixed the following code smells:
1. Use concise character class syntax
2. Add a "break" statement or remove this "else" clause.
3. Replace this generic exception class with a more specific one.
4. Use a regular expression literal instead of the 'RegExp' constructor.
5. Use the opposite operator ("not in") instead.
2022-09-10 13:48:14 +05:30
Akshay Joshi
3b95a416ca Fixed 'Remove the unnecessary boolean literals' code smell. 2022-09-09 15:23:18 +05:30
Akshay Joshi
4a17ad312f Update pgcli to latest release 3.4.1. Fixes #7411 2022-06-02 17:29:58 +05:30
Akshay Joshi
2786f7ac5a Update copyright notices for 2022 2022-01-04 13:54:25 +05:30
Nikhil Mohite
36f76f5e2c Fixed autocomplete issue where it is not showing any suggestions if the schema name contains escape characters. Fixes #6045. 2021-01-29 11:45:38 +05:30
Akshay Joshi
b372f08a59 Update copyright notices for 2021 2021-01-04 15:34:45 +05:30
Akshay Joshi
296d22ad83 Updated version of 'sqlparse' as pgcli updated and tested it. 2020-12-14 11:39:50 +05:30
Akshay Joshi
300de05a20 Merged the latest code of 'pgcli' used for the autocomplete feature. Fixes #5497 2020-10-01 13:29:46 +05:30
Cyril Jouve
5a253f9053 Change the following to replace Python 2 code with Python 3:
1) Replace the deprecated unit test method.
2) Wraps filter usage in a list call.
3) Converts the old metaclass syntax to new.
4) Use range instead of xrange method.
5) Change Unicode to str.
6) Several other transformations.
7) Fixed change password test cases.
8) Use simplejson instead of plain JSON.
2020-08-31 16:45:31 +05:30
Nikhil Mohite
d2577e32e6 Fixed cognitive complexity issues reported by SonarQube. 2020-08-25 18:13:01 +05:30
Cyril Jouve
f93cfe8c4c Remove old Python 2 compatibility code. Fixes #5700 2020-07-27 11:03:13 +01:00
Aditya Toshniwal
df05efd7d9 Fixed vulnerabilities and few design suspicions where two conditional structures are having the same implementation. 2020-06-17 17:15:09 +05:30
Aditya Toshniwal
641f7bbe9d Some clumsy coding related fixes reported by SonarQube. 2020-06-15 16:50:07 +05:30
Akshay Joshi
0620fafb6c Fixed PEP8 issues discovered after pycodestyle gets upgraded. 2020-05-13 17:14:32 +05:30
Akshay Joshi
ad80217593 Remove Python2 references from the source code.
refs #5443

Initial patch: Neel Patel
2020-04-30 17:22:48 +05:30
Dave Page
01c7636c75 Update copyright notices for 2020. 2020-01-02 14:43:50 +00:00
Cyril Jouve
cbd8f8236a Remove Python 2.6 code that's now obsolete. Fixes #3935 2019-01-31 13:47:56 +01:00
Akshay Joshi
c455dda3ce Ensure auto complete should works for columns from a schema-qualified table. Fixes #3810 2019-01-03 18:59:57 +05:30
Akshay Joshi
3a130d68c5 Ensure auto complete should works when first identifier in the FROM clause needs quoting. Fixes #3809 2019-01-03 17:22:42 +05:30
Murtuza Zabuawala
e23d307c56 Update copyright notices for 2019 2019-01-02 15:54:12 +05:30
Akshay Joshi
ef0e53e8fc Fixed pep8 issue 2018-10-15 17:41:21 +05:30
Akshay Joshi
fd2c2c4ff7 Fixed minor issue in SQL autocomplete. 2018-10-15 17:36:11 +05:30
Akshay Joshi
4010dc80a9 Ensure auto-complete works for objects in schemas other than public and pg_catalog. Fixes #3630 2018-09-11 12:56:14 +01:00
Akshay Joshi
b665f8fac8 Fixed auto complete issue for EPAS database server. 2018-08-30 12:30:00 +05:30
Aditya Toshniwal
ea787b30eb Fixed auto complete issues for Python 2.6 2018-08-27 16:37:00 +05:30
Akshay Joshi
7a3f3046df Merge pgcli code with version 1.10.3, which is used for auto complete feature. 2018-08-27 15:00:56 +05:30
Akshay Joshi
52fc0846cd pgAdmin4 should work with python 3.7, Fixes #3458 2018-08-06 15:35:03 +05:30
Akshay Joshi
b48145f01f Add an option to auto-complete keywords in upper case. Fixes #2686 2018-06-15 10:18:56 +01:00
Akshay Joshi
88a2309a26 Fix auto-complete. Fixes #3374 2018-06-13 15:53:21 +01:00
Murtuza Zabuawala
c3ddb7df38 PEP8 fixes for the utils module. Fixes #3076 2018-01-31 13:58:55 +00:00
Dave Page
89821c0d19 Update copyright notices for 2018. 2018-01-05 10:42:50 +00:00
Dave Page
7450c2df0d Revert code cleanup that wasn't 2.6 compatible. 2017-03-27 21:27:17 -04:00
Dave Page
6152d73f13 Fix some code inspection complaints 2017-03-25 22:04:52 -04:00
Murtuza Zabuawala
0da8d1fe4c Another Python 3 fix. 2017-01-31 12:12:22 +00:00
George Gelashvili
19be3529f8 Create a template loader for SQL templates.
This will automatically find the correct version of a template for the server version, and allows us to remove templates that were previously duplicated for different server versions.

Patch by George & Tira at Pivotal. Review by me and Murtuza from EDB.

Discussion: https://www.postgresql.org/message-id/flat/CAHowoHaU9_pkCt%2B1g8dpY3hsXXZmsJZiJH-3-_Hd%2BC1MxiGhtA%40mail.gmail.com#CAHowoHaU9_pkCt+1g8dpY3hsXXZmsJZiJH-3-_Hd+C1MxiGhtA@mail.gmail.com
2017-01-30 11:25:03 +00:00
Dave Page
f221194bcc Update copyright notices for 2017. 2017-01-04 13:33:32 +00:00
Akshay Joshi
e160909423 Quote identifiers correctly in auto-complete. Fixes #1992 2016-12-05 13:15:03 +09:00
Murtuza Zabuawala
a0a6428e86 Ensure compatibility with newer sqlparse modules. Fixes #1725 2016-09-26 13:49:54 +01:00
Dave Page
7d0fe669ca Code tidy. 2016-06-21 14:21:06 +01:00
Dave Page
3026b470e9 Optimise Python imports. 2016-06-21 14:12:14 +01:00
Akshay Joshi
0a354055a9 Adding support for autocomplete in the SQL Editor.
In Query editor, we can use the autocomplete feature by using keyword
combination - 'Ctrl + Space'.
2016-05-21 16:04:29 +05:30