1
1
mirror of https://github.com/dbcli/pgcli.git synced 2024-10-06 10:17:15 +03:00
Commit Graph

359 Commits

Author SHA1 Message Date
Irina Truong
b136196f29 Merge pull request #780 from dbcli/feature/output_formatter_generator
Preliminary work for a future change in outputting results that uses less memory
2017-08-18 15:27:43 -07:00
Dick Marinus
d2ecbde849 Preliminary work for a future change in outputting results that uses less memory 2017-08-18 20:40:16 +02:00
Dick Marinus
5ab0dbfdea Fix TODO, optionally use POSTGRES_USER, POSTGRES_HOST POSTGRES_PASSWORD from environment 2017-08-18 06:52:29 +02:00
Amjith Ramanujam
887a826415 Merge branch 'master' into koljonen/array_formatting 2017-08-06 21:16:08 -06:00
Amjith Ramanujam
99c9040c3d Merge pull request #771 from dbcli/koljonen/reservered_words
Don't quote identifiers that are non-reserved keywords
2017-08-06 21:14:40 -06:00
Joakim Koljonen
0fdf0b0ea1
Make pep8radius happy
As usual: No idea why it's complaining, and its suggestion looks
pretty awful, so let's just add random newlines and hope for the best.
2017-08-07 03:55:44 +02:00
Joakim Koljonen
8ae1c7d553
Import unicode_literals in test_main.py 2017-08-07 02:31:16 +02:00
Joakim Koljonen
13d8893427
Reformat code for readability and linter happiness 2017-08-06 19:30:47 +02:00
Joakim Koljonen
c616a8b422
Improve formatting of array output
Before this change, e.g. `SELECT '{1}'::numeric` would output `[Decimal(1)]`.
Now it instead outputs `{1}`.
2017-08-06 19:30:34 +02:00
Joakim Koljonen
b90beeb4d3
Don't quote identifiers that coïncide with non-reserved keywords
Keep track of which keywords are reserved, and quote identifiers
that coïncide with those.
https://www.postgresql.org/docs/10/static/sql-keywords-appendix.html
2017-08-06 09:46:52 +02:00
Joakim Koljonen
9d146f63aa
Don't include args in function suggestions for backslash commands 2017-08-06 08:13:43 +02:00
Irina Truong
8547694ec4 PEP8. 2017-07-25 15:09:39 -07:00
Irina Truong
1624cf608d Behave tests should also accept pgport. 2017-07-25 10:16:34 -07:00
Joakim Koljonen
a326e54884
Merge branch 'master' into koljonen/suggest_functions_with_args 2017-07-16 12:13:36 +02:00
Joakim Koljonen
d4396686a1
Try to make linter happy 4 2017-07-07 17:22:21 +02:00
Joakim Koljonen
c5eaa77778
Try to make linter happy 2017-07-07 17:22:19 +02:00
Joakim Koljonen
f5784746d9
Skip unwanted columns when expanding INSERT INTO tbl(*
Skip those that have a default value of some sequence (i.e. serial columns)
and those that have a default value of 'now()'.
2017-07-07 17:22:17 +02:00
Joakim Koljonen
2b0ca684d4
Add defaults to column metadata 2017-07-05 17:57:38 +02:00
Irina Truong
25dd0360d0 PEP8. 2017-06-26 13:03:48 -07:00
Irina Truong
8353f1ef2d Added functional tests for expanded mode. 2017-06-26 11:28:32 -07:00
Thomas Roten
7ef74ae3bd Move format_output out of Pgcli class. 2017-06-26 10:10:41 -05:00
Joakim Koljonen
5ef0c0ccea
Suggest function signature after CREATE FUNCTION 2017-06-25 12:49:23 +02:00
Joakim Koljonen
f355c30ef7
Include arguments in function completions
E.g. instead of suggesting `my_func()`, suggest `my_func(arg1 :=, arg2 :=)`
or `my_func(arg1 text, arg2 bigint)`, depending on the context.
2017-06-25 01:35:22 +02:00
Thomas Roten
ee5435717a PEP8 fixes. 2017-06-23 14:55:11 -05:00
Thomas Roten
f14d3b2e10 Do not expect numbers in exponent notation. 2017-06-23 14:46:07 -05:00
Thomas Roten
de9069d3d9 Merge branch 'master' of github.com:dbcli/pgcli into feature/cli_helpers_output_format
* 'master' of github.com:dbcli/pgcli:
  Use standard NullHandler
  Golf pep8radius
  Fix PEP8 empty line errors
2017-06-19 08:42:20 -05:00
Étienne BERSAC
e124c03575
Fix PEP8 empty line errors 2017-06-14 18:12:05 +02:00
Thomas Roten
6a330140bb Remove tabulate and expanded output. 2017-06-11 21:20:24 -05:00
Thomas Roten
61f0d63013 Initial work on using CLI Helpers. 2017-06-11 21:07:40 -05:00
Irina Truong
422ea6e649 Fixed copypaste that should not have been checked in. 2017-06-10 16:37:52 -07:00
Irina Truong
ea0556b8c6 Schema name should be escaped in SET SCHEMA. 2017-06-09 14:41:33 -07:00
Alexander Schmolck
0c729909cd Make it possible to use SSL with pgcli
This adds support for additional url query params which make stuff like

```
pgcli "postgres://user:pass@host.invalid/db?\
sslmode=verify-full&sslcert=my.pem&sslkey=my-key.pem&sslrootcert=ca.pem"
```

work. More generally it allows one to pass through various extra connection
options.
2017-05-25 14:49:30 +01:00
Dick Marinus
c6ae43a398 Merge remote-tracking branch 'upstream/master' into feature/tox_behave 2017-05-22 20:45:55 +02:00
Dick Marinus
bbb0866806 Add behave to tox 2017-05-22 20:44:02 +02:00
Dick Marinus
0031814627 fix pgspecial update in behave tests 2017-05-06 15:51:47 +02:00
Dick Marinus
f39dda5773 Behave remove boiler plate code 2017-05-02 20:20:13 +02:00
Irina Truong
e604096d96 Get rid of tmp var. 2017-04-29 15:23:13 -07:00
Irina Truong
84d89250cd Merge branch 'master' into feature/behave_fix_cleanup 2017-04-29 14:55:58 -07:00
Irina Truong
b2a22580a6 Merge pull request #706 from dbcli/feature/behave_tee
Test using behave the tee command
2017-04-29 14:51:48 -07:00
darikg
5508d725b9 Merge pull request #693 from bersace/well-known-following-keywords
Complete well known following keywords
2017-04-29 15:47:33 -04:00
Dick Marinus
5a60402649 Test using behave the tee command 2017-04-29 21:35:06 +02:00
Dick Marinus
d71032c37f behave fix clean up
In an earlier commit I've changed the current working directory and
the removal of a temporary file didn't take that into account.
2017-04-29 10:10:05 +02:00
Dick Marinus
fb25e4b923 remove debugging logfile 2017-04-29 10:02:15 +02:00
Dick Marinus
8fa3d18353 behave test source command 2017-04-28 21:16:11 +02:00
Dick Marinus
6f1f4bfa8e behave quit pgcli nicely 2017-04-28 18:00:51 +02:00
Étienne BERSAC
219b4a52d9
Fix PEP8 for #693 2017-04-27 21:32:44 +02:00
Étienne BERSAC
293b6b3a41
Complete keywords depending on previous token
Keywords list is based on
https://www.postgresql.org/docs/9.6/static/sql-commands.html.
2017-04-27 21:32:43 +02:00
Irina Truong
bad238f996 Merge pull request #686 from owst/column_completion_for_order_by_and_distinct
Suggest columns for `ORDER BY` and `DISTINCT` (fixes #685)
2017-04-26 11:01:32 -07:00
Owen Stephens
3d560baf6c Suggest columns for ORDER BY and DISTINCT (fixes #685)
Having typed an alias name in an `ORDER BY` or (`SELECT`) `DISTINCT`
clause, the alias was not taken account of, and the completion simply
listed all columns. This change fixes that, and makes the autocompletion
behave the same as in `SELECT` and `WHERE` clauses.
2017-04-26 01:10:57 +01:00
Dick Marinus
bc47a07d92 behave pager wrapper 2017-04-25 07:37:53 +02:00