diff --git a/README.md b/README.md index 9fd78253..396833ab 100644 --- a/README.md +++ b/README.md @@ -236,4 +236,13 @@ $ pydruid http://localhost:8082/druid/v2/sql/ cnt ----- 12345 +> SELECT TABLE_NAME FROM INFORMATION_SCHEMA.TABLES; +TABLE_NAME +---------- +test_table +COLUMNS +SCHEMATA +TABLES +> BYE; +GoodBye! ``` diff --git a/pydruid/console.py b/pydruid/console.py index f91bd1ba..35dece09 100644 --- a/pydruid/console.py +++ b/pydruid/console.py @@ -183,6 +183,8 @@ def main(): query = query.strip('; ') if query: # shortcuts + if query.lower() in ('bye', 'exit', 'quit'): + break for pattern, repl in replacements.items(): query = re.sub(pattern, repl, query)