Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ Features
--------

* Support SSL query parameters on DSNs.
* More information and care on KeyboardInterrupt.

Internal
--------
Expand Down
10 changes: 9 additions & 1 deletion mycli/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -774,11 +774,19 @@ def one_iteration(text=None):
status_str = str(status).lower()
if status_str.find("ok") > -1:
logger.debug("cancelled query, connection id: %r, sql: %r", connection_id_to_kill, text)
self.echo("cancelled query", err=True, fg="red")
self.echo(f"Cancelled query id: {connection_id_to_kill}", err=True, fg="blue")
else:
logger.debug(
"Failed to confirm query cancellation, connection id: %r, sql: %r",
connection_id_to_kill,
text,
)
self.echo(f"Failed to confirm query cancellation, id: {connection_id_to_kill}", err=True, fg="red")
except Exception as e:
self.echo("Encountered error while cancelling query: {}".format(e), err=True, fg="red")
else:
logger.debug("Did not get a connection id, skip cancelling query")
self.echo("Did not get a connection id, skip cancelling query", err=True, fg="red")
except NotImplementedError:
self.echo("Not Yet Implemented.", fg="yellow")
except OperationalError as e:
Expand Down