mirror of https://github.com/dbcli/pgcli
Refresh completions after COMMIT or ROLLBACK.
This commit is contained in:
parent
265c063159
commit
fc3025e9bc
|
@ -1,7 +1,7 @@
|
|||
Upcoming
|
||||
========
|
||||
|
||||
* TBD
|
||||
* Refresh completions after `COMMIT` or `ROLLBACK`. (Thanks: `Irina Truong`_)
|
||||
|
||||
1.6.0
|
||||
=====
|
||||
|
|
|
@ -893,10 +893,10 @@ def format_output(title, cur, headers, status, settings):
|
|||
|
||||
def has_meta_cmd(query):
|
||||
"""Determines if the completion needs a refresh by checking if the sql
|
||||
statement is an alter, create, or drop"""
|
||||
statement is an alter, create, drop, commit or rollback"""
|
||||
try:
|
||||
first_token = query.split()[0]
|
||||
if first_token.lower() in ('alter', 'create', 'drop'):
|
||||
if first_token.lower() in ('alter', 'create', 'drop', 'commit', 'rollback'):
|
||||
return True
|
||||
except Exception:
|
||||
return False
|
||||
|
|
|
@ -50,6 +50,7 @@
|
|||
"CLUSTER": [],
|
||||
"COLUMN": [],
|
||||
"COMMENT": [],
|
||||
"COMMIT": [],
|
||||
"COMPRESS": [],
|
||||
"CONCURRENTLY": [],
|
||||
"CONNECT": [],
|
||||
|
@ -218,6 +219,7 @@
|
|||
"RETURNS": [],
|
||||
"REVOKE": [],
|
||||
"RIGHT": [],
|
||||
"ROLLBACK": [],
|
||||
"ROW": [],
|
||||
"ROWID": [],
|
||||
"ROWNUM": [],
|
||||
|
|
Loading…
Reference in New Issue