Merge pull request #264 from saimn/ipython-completion

Complete table names with IPython
This commit is contained in:
Stefan Wehrmeyer 2018-09-26 17:22:40 +02:00 committed by GitHub
commit 7fc4664790
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -221,6 +221,10 @@ class Database(object):
"""Get a given table.""" """Get a given table."""
return self.get_table(table_name) return self.get_table(table_name)
def _ipython_key_completions_(self):
"""Completion for table names with IPython."""
return self.tables
def query(self, query, *args, **kwargs): def query(self, query, *args, **kwargs):
"""Run a statement on the database directly. """Run a statement on the database directly.