1
0
mirror of https://github.com/dbcli/pgcli synced 2024-05-31 01:17:54 +00:00
Commit Graph

332 Commits

Author SHA1 Message Date
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
赖信涛
e9874e2f96
python3.8: add travis test and setup.py class. (#1157) 2020-03-18 09:11:10 -07:00
g.denis
0f3d4602ef
Fix: Unable to drop previously connected-to database (#1152)
* close connections + added to authors + changelog

* check conn exists
2020-03-12 13:45:59 -07:00
赖信涛
bc7a5d0100
Drop Python3.5. (#1154)
* Drop Python3.5.

* delete 3.5 from setup.py

* fix black format. Using python3.7 for development now.

* black target to py36
2020-03-11 13:58:13 -07:00
赖信涛
fd77549754
Deprecate Python2.7. (#1153)
* deprecate Python2.7.

So we can use latest version of prompt-toolit.
Relate: https://github.com/dbcli/pgcli/pull/1149

* black format, remove 2.7 support.

* using version py35 for black.

* Revert "black format, remove 2.7 support."

This reverts commit 4b6d0496cc.

* deprecated py27 using black.

* remove 2.7 from travis.

* update setup.py: delete python 2.7 support.
2020-03-09 20:14:51 -07:00
lazydba247
91263c37b9
Add Support for partitioned tables. (#1145)
* partitioned tables: add support

Starting from 9.6+ relkind has new members (more info here: https://www.postgresql.org/docs/12/catalog-pg-class.html)

* Update AUTHORS

* Update changelog.rst

* foreign tables: add support

Starting from 9.6+ relkind has new members (more info here: https://www.postgresql.org/docs/12/catalog-pg-class.html)
2020-02-13 14:24:37 -08:00
赖信涛
8fe316e537 Drop Python 3.4 support (#1141)
* remove python3.4 support.

Python 3.4 has reached end-of-life.
https://www.python.org/downloads/release/python-340/

* drop maximun version of pytest

* update changelog

* add laixintao to contributors, delete py34 from tox
2020-01-15 22:45:16 -08:00
George Thomas
77a361966a Fix warning raised for using is not to compare string literal (#1139)
Using `is not` for comparing string literals raises warning that != should be
used.

Fixes #1138
2020-01-14 20:56:07 -08:00