1
0
Fork 0
Commit Graph

339 Commits

Author SHA1 Message Date
Eric Young 79df61f674 Small developer improvements for Windows-based devs. 2022-09-01 10:32:36 -05:00
ERYoung11 f5669e756b Updated changelog.rst. 2022-08-31 21:46:26 -05:00
Irina Truong 165818bee3 More generic try/catch when dealing with keyring. 2022-06-10 10:27:54 -07:00
Kian-Meng Ang d608ffe7c7
Fix typos (#1345)
Co-authored-by: Irina Truong <i.chernyavska@gmail.com>
2022-06-08 11:38:29 -07:00
Irina Truong 18071754bc
Port to psycopg3 (#1324)
* WIP.

* Add some comments about porting from psycopg 2 to 3 (#1318)

* WIP

* Disable _set_wait_callback()

* TransactionStatus.

* First working query.

* More pg3 changes.

* test_pgexecute still fails.

* Fix bytea support.

* Fix json and enum unicode.

* Get unit tests to pass.

* Behave tests still break, WIP.

* Prompt seems to be displayed fine, why don't the tests see the whitespace?

* Python version.

* Fix test.

* Black.

* Added black to dev reqs.

* nbu link for donations.

* Use psycopg.sql to format statement.

* Special case for show help in pgbouncer.

* Fix test.

* Added integration test.

* Install pgbouncer in ci.

* Fix integration test.

* Remove tmate session.

* Revert commenting out python versions.

* Pin pgspecial to >=2.

* Changelog.

Co-authored-by: Daniele Varrazzo <daniele.varrazzo@gmail.com>
Co-authored-by: Amjith Ramanujam <amjith.r@gmail.com>
2022-06-06 11:20:48 -07:00
Daniel Kukula 372da81ec4
add explain visualizer (#1279)
* add explain visualizer

* format files

* remove humanize dependency

* disable by default

* add explain visualizer

* run black
2022-04-03 19:20:02 -07:00
Irina Truong b1d0dd16d5
Changelog update to release 3.4.1. (#1325) 2022-03-19 13:59:32 -07:00
Irina Truong f0ab01c117 Changelog. 2022-03-01 20:19:51 -08:00
Irina Truong 72204adb98
Prepare to release 3.4.0. (#1315)
* Prepare to release 3.4.0.

* Add the TBD section.
2022-02-21 12:27:39 -08:00
Bruno Inec ed9d123073
Add SSH tunnel support (#1301)
* Add initial sshtunnel support

* Force CI to rerun.

* Fix unit test for 3.6.

* Black.

Co-authored-by: Irina Truong <i.chernyavska@gmail.com>
2022-02-18 14:57:42 -08:00
Amjith Ramanujam 5137a125f2 Update changelog. 2022-01-18 12:57:53 -08:00
Amjith Ramanujam a981564f9d
Upgrade cli_helpers to workaround the Pygments regression. (#1310) 2022-01-18 12:33:26 -08:00
Amjith Ramanujam a082b7cb72 Fix the changelog format again. 2022-01-13 13:05:58 -08:00
Amjith Ramanujam b5a523b7da Fix the changelog format 2022-01-13 12:59:07 -08:00
Amjith Ramanujam 2b2317e0b0 Update changelog. 2022-01-13 10:13:43 -08:00
Amjith Ramanujam 3bb7dd8256 Update changelog for 3.3.0 2022-01-11 08:37:27 -08:00
Saif Hakim 123e00a086
Re-run last query with bare `\watch` (#1283)
* Re-run last query with bare `\watch`

* add test

* clean up post test refactor

* lint

* rerun tests
2021-09-30 12:00:31 -07:00
Irina Truong c65495716d
Add setting in config to control truncating field values. (#1285)
* Add setting in config to truncate field value.

* Black.

* Changelog.

* Fix tests.
2021-09-03 16:58:03 -07:00
Amjith Ramanujam d10158dc72 Update changelog for 3.2.0 release. 2021-08-23 09:01:33 -07:00
Irina Truong e0a4c18c4a
Another attempt to fix pgbouncer error (1093.) (#1097)
* Another attempt to fix pgbouncer error (1093.)

* Fixes for various pgbouncer problems.

* different approach with custom cursor.

* Fix rebase.

* Missed this.

* Fix completion refresher test.

* Black.

* Unused import.

* Changelog.

* Fix race condition in test.

* Switch from is_pgbouncer to more generic is_virtual_database, and duck-type it. Add very dumb unit test for virtual cursor.

* Remove debugger code.
2021-05-21 15:32:34 -07:00
Amjith Ramanujam 1d2570f462 Include functions from search_path in completion. 2021-05-06 21:12:48 -07:00
Amjith Ramanujam 3a95530677
Merge branch 'master' into func-pr 2021-05-06 08:12:31 -07:00
Paweł Sacawa 26bdc4e759 Add missing function literals 2021-05-06 05:15:05 -04:00
Paweł Sacawa 773f69ba43 Modify changelog 2021-05-02 18:27:55 -04:00
Irina Truong 954b8c3902
Use configured pager if table format is csv. (#1260)
* Use configured pager if table format is csv.

* Changelog.

* Simplify.
2021-03-12 14:14:09 -08:00
Georgy Frolov a017fa96bf
fix IPython magic (#1253) 2021-03-12 10:16:14 -08:00
Irina Truong 469d22f2b6 Changelog. 2021-02-26 13:18:31 -08:00
Georgy Frolov c9fd72449e
skip initial comment in pg_session file (#1245)
* skip initial comment in pg_session file

* add test
2021-02-22 14:55:55 -08:00
Georgy Frolov 30212c6fc6
fixed unknown symbol REPLACE_SINGLE in prompt_toolkit < 3.0.6 (#1246)
* fixed unknown symbol REPLACE_SINGLE in prompt_toolkit < 3.0.6

* changelog
2021-02-22 14:54:23 -08:00
Irina Truong a3287c4ab2
Finer control over destructive warning. (#1242)
* Finer control over destructive warning.

* Review feedback.

* Changelog.

* Run integration tests with --warn=moderate.

* Fix typo.

* Black.
2021-02-12 21:09:38 -08:00
Eero Ruohola 87ffae295e
Fix issue where `syntax_style` config value would not have any effect (#1241)
These config properties got introduced in 41dd24e8 as a means to have
more granular control over the syntax highlighting. The problem is that
these cannot be in the default config file since `get_config()` always
reads both the default config file and the user specified one, and there
is no way to unset these variables in the user specified config file to
restore their default behavior. Even if there would be a way, it
wouldn't be intuitive at all to be required to unset some random
settings under the `[colors]` section just to be able to use the well
documented `syntax_style` setting.

Note that one *can* still set these three lines in their user config
file if they want to utilize them.

Resolves #1212
2021-02-10 15:06:19 -08:00
Irina Truong 6627051819
Changelog update before release. (#1227) 2020-12-11 15:33:09 -08:00
Kevin Marsh 34d6e080ff
dependencies: add support for sqlparse 0.4.x (#1224) 2020-12-01 16:03:38 -08:00
Jan Brun Rasmussen 352ed41980
Add schema suggestion for functions (#1206)
* Add schema suggestion for functions

- Update sqlcompletion.py
- Update metadata files

* Move autocomletion for function under condition

- Make sure suggestion are only added under drop, alter etc.
2020-09-08 10:02:25 -07:00
Tom Caruso 223015a1fa
More explicit error message when DSN alias is not found (#1198)
* add a specific error message when DSN with provided alias is not found

* update changelog & authors file
2020-07-31 10:25:06 -07:00
Sky.G.Uieen df1b40ca22
Update suggestion literals (#1195)
* Updated all data types literals

* Updated sql functions literals

* Updated changelog and auther

* Updated test code

* Added datatype test case
2020-07-31 10:21:58 -07:00
Tom Caruso 8f7e314508
Move from humanize to pendulum library for displaying query durations (#1199) 2020-07-28 23:08:19 -07:00
Dick Marinus 80bf05a3b3
Keep support for prompt_toolkit 2 (#1197)
* Keep support for prompt_toolkit 2

* include prompt toolkit 3
2020-07-08 12:28:24 -07:00
Sky.G.Uieen 41dd24e8da
Add custom color (#1196)
* Updated author, changelog for supporting color of string, number, keyword

* Added string, number, keyword custom color
2020-07-07 20:19:22 -07:00
Irina Truong 106c6c7bf8 Fix for #1193 list index out of range on sql comment. 2020-06-26 14:01:24 -07:00
laixintao 0c24e8bda2
Support style for missing value. (#1186)
* Support style for missing value.

* update changelog.

* upgrade minimal version of cli_helpers, in order to use style for null.
2020-05-28 15:29:50 -07:00
anthonydb 635eaaa25b Add name 2020-05-26 14:00:05 -04:00
anthonydb d492000675 Add info to changelog.rst and AUTHORS 2020-05-26 09:12:42 -04:00
Igor Kim b994c75701
Update python version from 2.7 to 3.8 in Dockerfile (#1181)
* Update python version from 2.7 to 3.8 in Dockerfile

* Update AUTHORS and changelog.rst
2020-05-11 09:51:23 -07:00
pmav99 bcb0c8bce7
Add support for using pspg as the pager. (#1173)
* Stop printing "status" when table_format is "csv"

* Use the "unix" dialect on *nix for CSV output.

* Use a pager when `pspg` has been configured with CSV "table_format".

Fix #1102
2020-04-23 10:17:40 -07:00
Amjith Ramanujam 3071de14f5 Update changelog for the compact output. 2020-04-18 19:08:07 -07:00
Stephano Paraskeva 936475258d
show_bottom_toolbar - Feature to Show/Hide Toolbar (#1170)
* adds ternary to decide whether bottom_toolbar is shown based on config value

* runs black format

* adds name to authors

* modifies changelog.rst

* removes change in changelog.rst

* formats config

* removes unused variable, adds change to changelog

* changes default back to true

* removed reference to var
2020-04-17 22:58:13 -07:00
g.denis f3ac559844
Add pg_service.conf handling (#1155)
* add parse_service_info

* added tests

* changelog + AUTHORS

* py35
2020-04-17 14:52:19 -07:00
Irina Truong 63b87ba3a8
New release 3.0.0. (#1165) 2020-04-10 15:14:56 -07:00
赖信涛 b6e2a229e5
upgrade prompt-toolit to 3.0 (#1149)
* upgrade prompt-toolit to 3.0

fix: https://github.com/dbcli/pgcli/issues/1148

related:
https://github.com/prompt-toolkit/python-prompt-toolkit/issues/886

in order to make the `behave` test pass, I have to:

- extend timeout for database connection test.
- extend timeout for basic command expect.
- extend timeout for features/steps/crud_table.py:: see data selected.
- disable cpr for features but "run the cli"

* [ci] disable CPR for all behave tests.

* bugfix: remove duplicated prompt expect.

* [ci] delete CPR env setting.

* Revert "[ci] delete CPR env setting."

This reverts commit fe4d5b565e.

* revert the extending timeout back.

* [ci] test when didn't disable CPR.

* Revert "[ci] test when didn't disable CPR."

This reverts commit d379b1e736.
2020-04-05 20:56:31 -07:00