opnsense-ports/databases/py-mycli/files/patch-mycli-packages-completion_engine.py
Franco Fichtner c788dece15 */*: sync with upstream
Taken from: FreeBSD
2016-11-20 11:10:19 +01:00

14 lines
650 B
Python

Obtained from: https://github.com/dbcli/mycli/commit/63a6339e451dfe537f1b7cf43758409abea52342
--- mycli/packages/completion_engine.py.orig 2016-09-18 04:19:04 UTC
+++ mycli/packages/completion_engine.py
@@ -197,6 +197,9 @@ def suggest_based_on_last_token(token, t
return [{'type': 'column', 'tables': extract_tables(full_text)}]
elif token_v in ('set', 'by', 'distinct'):
return [{'type': 'column', 'tables': extract_tables(full_text)}]
+ elif token_v == 'as':
+ # Don't suggest anything for an alias
+ return []
elif token_v in ('show'):
return [{'type': 'show'}]
elif token_v in ('to',):