1
0
Fork 0
Commit Graph

2202 Commits

Author SHA1 Message Date
laixintao 2588068171
fix black format. 2020-12-02 20:07:01 +08:00
laixintao 031325a0ac
[wip] featu: supprt --history option.
I added two args for PGCli init, because I think we need to figure out
which history file to use on `__init__`. And we will need `histfile`
`alias_dsn` for that.

PS: I don't think change PGCli's property after initializing is good.
2020-10-25 15:02:15 +08:00
laixintao 19ed8b28aa
doc: add history_file per dsn config, and --history option. 2020-10-15 19:06:35 +08:00
laixintao 7626d9a5f2
Merge pull request #1211 from dbcli/bugfix/behave
fix behave test, keep support for prompt-toolkit 2.x; lock prompt-toolkit==3.0.5 for test.
2020-09-14 11:55:44 +08:00
laixintao 13bd678ccd
format code using black. 2020-09-14 10:27:46 +08:00
laixintao 5a61b243e0
lock prompt_toolkit on 3.0.5 for prompt_toolkit. 2020-09-14 10:21:50 +08:00
laixintao 3afbafee52
disable cache for pip install.
Otherwise it will use cache from travis.
2020-09-14 10:15:32 +08:00
laixintao e60d28f194
bugfix: revert prompt_toolkit to 2.0.6
This was introduced by: e9c97072af (  Use
InputMode.REPLACE_SINGLE (#1208) )

see also: https://github.com/dbcli/pgcli/pull/1197
2020-09-14 10:01:23 +08:00
laixintao 49930e2d8c
Revert "Temporarily comment out behave tests."
This reverts commit 59ae65cbbf.
2020-09-14 09:33:20 +08:00
Irina Truong 59ae65cbbf Temporarily comment out behave tests. 2020-09-08 10:34:14 -07: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
bitkeen d9adca7d5e
Add Token.Prompt/Continuation (#1207) 2020-09-06 21:52:12 -07:00
bitkeen e9c97072af
Use InputMode.REPLACE_SINGLE (#1208)
InputMode.REPLACE_SINGLE was added to prompt-toolkit.
This fixes Exception <InputMode.REPLACE_SINGLE: 'vi-replace-single'>
in single-char replace mode when using prompt_toolkit>=3.0.6.
2020-09-05 14:30:46 -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
laixintao 77414aa9e7
Merge pull request #1194 from dbcli/j-bennet/fix-sql-comment
J bennet/fix sql comment
2020-06-28 10:12:17 +08: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
Amjith Ramanujam 4a98b37877
Merge pull request #1187 from anthonydb/master
Minor typo fixes in pgclirc
2020-05-26 11:28:48 -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
anthonydb a9ef523eb3 Minor typo fixes in pgclirc 2020-05-26 09:08:14 -04:00
Georgy Frolov bd705bd5c4
add python_requires constraint to setup.py (#1182) 2020-05-12 16:23:34 -07: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
Irina Truong 901ef31fd1
Fix bug introduced in #1102. (#1178) 2020-05-07 16:41: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
Amjith Ramanujam 64c0b3553d
Merge pull request #1171 from dbcli/bugfix/no-new-line
bugfix: don't echo a newline when output is empty.
2020-04-18 19:06:25 -07:00
laixintao 94718efc35
bugfix: don't echo a newline when output is empty. 2020-04-18 14:05:34 +08: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 005fd2fcee Releasing version 3.0.0 2020-04-10 15:16:44 -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
antoniotrkdz 93c14f844e
pgcli bash completion script (#892)
This file is a bash completion script for pgcli.
It allows to <tab> complete database names, users and hosts, plus showing the other available options when calling pgcli atthe terminal prompt.
In order to work it steals a couple of functions from psql, which is the postgres CLI client installed by default. 
It is intended to be packaged with the debian package and to be copied on /usr/share/bash-completion/completions/pgcli (filename changes for consistency) upon installation of the package.
Please make the debian package mantainer aware of it and include it in the relevant section of the installation scripts/package.
I hope it is useful.
2020-04-03 15:15:53 -07:00
Chris Barnes d9ea18d3a0
Add --help output to README (#1164)
* Add --help output to README

* README: Add reference to psql env variables
2020-03-30 20:50:06 +08:00
Amjith Ramanujam 2a28399c3f
Add an example for how to use the colored prompt. (#1163) 2020-03-30 09:32:00 +08:00
赖信涛 d444db412b
upgrade coverage to 5.x (#1158) 2020-03-18 12:59:01 -07:00
赖信涛 e9874e2f96
python3.8: add travis test and setup.py class. (#1157) 2020-03-18 09:11:10 -07:00
Georgy Frolov 61c81b05f5 removed py2-related stuff 2020-03-14 10:53:43 +08: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
Amjith Ramanujam 2b55da8481
Merge pull request #1123 from TheJJ/main-file
add main file to allow python3 -m pgcli execution
2020-01-07 06:55:36 -08:00