1
0
Fork 0
Commit Graph

2176 Commits

Author SHA1 Message Date
Irina Truong 270e1ce7a2 Log message. 2019-10-26 13:21:23 -07:00
Amjith Ramanujam 199a0223e0
Merge pull request #1116 from dbcli/test_
Add a test to verify error message.
2019-10-25 22:21:51 -07:00
Amjith Ramanujam c908ef744f
Merge pull request #1115 from dbcli/owst/escape_enter_disable_for_vi_mode
Disable escape-enter keybinding in vi mode
2019-10-24 00:01:08 -07:00
Amjith Ramanujam f658e3d1b4 Add a test to verify error message. 2019-10-23 21:00:45 -07:00
Owen Stephens 995e7a9deb Disable escape-enter keybinding in vi mode
Escape then enter intended as two separate key presses is a very common
sequence when using vi mode - returning to normal mode from insert mode
(escape) and then submitting the query (enter). The presence of the
escape-enter key binding overrides this behaviour by inserting
undesirable newlines (newline is be easily inserted when in insert mode
by pressing enter) or by introducing a noticable delay/lag before enter
can be pressed after escape, due to prompt toolkit not being able to
recognise escape immediately (since it may form part of an escape-enter
sequence).
2019-10-23 23:12:54 +01:00
Amjith Ramanujam f25e49555a Fix the condition for <enter> key. (#1114)
* Fix the condition for <enter> key.

* Improve the debug message and remove debug statement.
2019-10-23 22:11:44 +01:00
Irina Truong 4f0c4d5a38 Fix for PQconninfo not available. 2019-10-19 11:36:38 -07:00
Amjith Ramanujam a713b5d08b
Merge pull request #1107 from owst/function_arg_completions_with_alias
Take account of table aliases when completing function args (#1048)
2019-10-16 20:57:19 -07:00
Amjith Ramanujam 2bf01a7784
Merge pull request #1109 from owst/use_keybinding_to_conditionally_force_handle_multiline_buffer
Handle a multi-line query on Enter key-press (fixes #1031)
2019-10-16 20:54:28 -07:00
Owen Stephens e9b18f9e84 fixup! fixup! Take account of table aliases when completing function args (#1048) 2019-10-16 23:33:43 +01:00
Owen Stephens 629a931aed fixup! fixup! Handle a multi-line query on Enter key-press (fixes #1031) 2019-10-16 22:26:25 +01:00
Owen Stephens 6763433a68 fixup! Handle a multi-line query on Enter key-press (fixes #1031) 2019-10-13 13:50:36 +01:00
Owen Stephens 7f44748149 Handle a multi-line query on Enter key-press (fixes #1031)
Use a (conditional) Enter key-binding to force-handle a multi-line
buffer, rather than doing so by (conditionally) disabling the multiline
mode of prompt_toolkit.

This has the benefit of being more efficient (the multiline Condition
filter is called very often, which (due to the repeated query parsing)
causes editing to become slow with a large buffer that ends in a
semicolon), clearer in intent (we want to force-handle the query, rather
than (temporarily) disable multiline mode which indirectly forces the
buffer to be handled) and avoids a bug in multi-line history search
(issue #1031)
2019-10-13 01:07:57 +01:00
Owen Stephens a700f2b788 fixup! Take account of table aliases when completing function args (#1048) 2019-10-12 17:11:32 +01:00
Owen Stephens b401b16d9a Take account of table aliases when completing function args (#1048) 2019-10-12 16:19:15 +01:00
Amjith Ramanujam d5cdd2ad4e
Merge pull request #1101 from ironiridis/master
rm Google Group from main.py
2019-10-01 12:37:56 -07:00
Christopher Harrington 7a77eda241
rm Google Group from main.py 2019-09-29 14:16:55 -05:00
Dick Marinus 67799b98ab add optional but default squash merge request to PULL_REQUEST_TEMPLATE (#1095) 2019-09-27 19:34:34 -07:00
Amjith Ramanujam 88b829aa82
Merge pull request #1094 from dbcli/j-bennet/superuser-redundant-query
Get server params, such as is_superuser and server_version, without e…
2019-09-02 12:36:15 -07:00
Irina Truong 2e6ef5a84d Changelog. 2019-09-02 12:35:49 -07:00
Irina Truong 04a74fce2c Get server params, such as is_superuser and server_version, without extra queries. 2019-08-28 08:26:24 -07:00
Irina Truong b2ebe0e95c
Issue 1018 display first 1k rows (#1092)
* Added changes to remove the prompt on >1000 rows queries

* Reformatted with black

* Changed comment on row_limit parameter

* Added contribution to changelog and name to AUTHORS

* Refactored test to reflect new functionality

* Removed argument

* Removed debug echo statement

* Reformatted with black

* Added changes to remove the prompt on >1000 rows queries

* Reformatted with black

* Changed comment on row_limit parameter

* Added contribution to changelog and name to AUTHORS

* Refactored test to reflect new functionality

* Removed argument

* Removed debug echo statement

* Reformatted with black

* Added missing issue numbers in changelog

* Reformatted code using black
2019-08-23 13:44:36 -07:00
Pedro Ferrari 19c3e0eeb8 Add key bindings to consistently move up and down in history (#1084) 2019-07-29 13:00:33 -07:00
Sebastian Janko f85642da67 Issue 1019 stacktrace on empty query (#1078)
* Added changes to skip empty queries

Empty queries consist of one or more semicolons

* Reformatted with black

* Added contribution to changelog and name to AUTHORS

* Black.
2019-07-12 17:24:39 -07:00
Irina Truong 10cc4ce2b9 Partial fix for #1058. (#1068) 2019-06-09 17:05:28 +02:00
Amjith Ramanujam f27ac1c110
Merge pull request #1064 from dbcli/amjith/slash-G
Add \G as a temporary way to use expanded mode.
2019-06-03 17:12:38 -07:00
Pablo 6d6ab3dab7 Add keybinding for alt-enter to introduce a line break (#1065)
* Add keybinding for alt-enter to introduce a line break.

* Update changelog.

* Added myself to AUTHORS file

* Fixed quote issue by pre-commit
2019-06-02 19:15:16 -07:00
Amjith Ramanujam 7da18ee794 Run black on test files. 2019-06-02 18:53:42 -07:00
Amjith Ramanujam 9abb4f8560 Run black. 2019-06-02 18:02:02 -07:00
Amjith Ramanujam d4f4cc317d Update changelog. 2019-06-02 17:59:31 -07:00
Amjith Ramanujam 3a45620731 Add \G as a temporary way to use expanded mode.
This is similar to mycli.
2019-06-02 17:57:36 -07:00
Irina Truong 77bd30dc95 Releasing version 2.1.1 2019-05-30 17:11:03 -07:00
Irina Truong a2ed5e46d1
Changelog update before release. (#1062) 2019-05-30 17:10:15 -07:00
Alexander Zawadzki df4dd00585 README.rst: tidy up redundant instructions (#1061)
* README.rst: tidy up redundant instructions 

Remove the README section which detailed how to force `psycopg2` 2.7 dependency installation from source rather than binary.

`psycopg2` 2.7 would automatically favour installation from binary. A bug affecting some users made it desirable to have the option to install from source instead. The README detailed how to do this using pip's `--no-binary` option (nice!).

`psycopg2` 2.8 has now split the binary and source dependencies into different packages with different names (source: [psycopg2 docs](http://initd.org/psycopg/docs/install.html#change-in-binary-packages-between-psycopg-2-7-and-2-8)) which makes the `--no-binary` instructions redundant. To specify source/binary you now need to explicitly specify the desired package.

As of #1060, installing `pgcli` from pip will result in the installation of `psycopg2` 2.8 from source.

* README: additional instructions for psycopg2 2.7 users

Anyone limited to psycopg2 2.7 may still encounter some known issues when installing from binary.
Add a link to the README to acknowledge this, and help those users install it from source.

* Update changelog.rst

* Update AUTHORS

* Update changelog
2019-05-30 10:03:47 -07:00
Telmo "Trooper 8c597751fd Allow psycopg2 up to 2.8.2 (#1060)
* Allow psycopg2 up to 2.8.2

This fixes the issue with pgcli not working on Arch Linux, since the package `python2-psycopg2` is already on 2.8.2.

* Added name to 'AUTHORS' and contribution to 'changelog.rst' referring to #2de6266

* Allow for newer versions of psycopg2 to be used
2019-05-29 21:14:32 -07:00
Irina Truong 8cb7009bcd
black all the things. (#1049)
* added black to develop guide

* no need for pep8radius.

* changelog.

* Add pre-commit checkbox.

* Add pre-commit to dev reqs.

* Add pyproject.toml for black.

* Pre-commit config.

* Add black to travis and dev reqs.

* Install and run black in travis.

* Remove black from dev reqs.

* Lower black target version.

* Re-format with black.
2019-05-25 13:08:56 -07:00
Amjith Ramanujam a5e607b6fc
Merge pull request #1056 from dbcli/handle_password_spaces
Handle password spaces
2019-05-21 21:27:47 -07:00
Irina Truong d661f63eec pep8. 2019-05-21 20:28:05 -07:00
Irina Truong b4fbe28286 Fix for dsn_password behave test. 2019-05-21 20:21:58 -07:00
Amjith Ramanujam 5177c9922e Add a behave test with spaces in password. 2019-05-15 23:40:21 -07:00
Amjith Ramanujam 004f62e714 Add some behavioral tests for command line options. 2019-05-14 00:01:20 -07:00
Amjith Ramanujam a45c67acf0 Handle password with spaces. 2019-05-13 15:13:15 -07:00
Irina Truong 300febccdd Dsn parameters not always present. (#1054)
* Dsn parameters not always present.
2019-05-11 07:57:45 +02:00
Amjith Ramanujam 580639904c
Merge pull request #1052 from dbcli/pr1047
Upgrade to sqlparse 0.3.0
2019-05-06 11:11:57 -07:00
Amjith Ramanujam fe1b202c55
Merge branch 'master' into pr1047 2019-05-06 11:11:47 -07:00
Amjith Ramanujam 9f2d61bc23
Merge pull request #1051 from dbcli/pr1035
Fix usage of pgservice #1035
2019-05-06 11:09:50 -07:00
Amjith Ramanujam 8b14029180 Fix the tests. 2019-05-06 09:12:42 -07:00
Amjith Ramanujam 1908142adb Upgrade to sqlparse 0.3.0. 2019-05-06 09:05:56 -07:00
Amjith Ramanujam dc43430a9a Update changelog. 2019-05-06 07:29:48 -07:00
Amjith Ramanujam a6d44df4a7 Merge branch 'master' into pr1035 2019-05-06 07:18:46 -07:00