From 9d1e1b8eeda9deef6de5a2c8347a3fcc9917654e Mon Sep 17 00:00:00 2001 From: Keelan Fadden-Hopper Date: Wed, 13 Feb 2019 11:50:45 +0000 Subject: [PATCH] Pass kwargs to get_table_names function When using the `get_table_names` function, the function currently will not allow the user to pass in the `schema` argument. This means that, for instance, you can't get the table names for a PostgreSQL schema other than the default schema. This feature could be added quite easily. --- records.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/records.py b/records.py index ad4e667..f10b56d 100644 --- a/records.py +++ b/records.py @@ -276,11 +276,11 @@ class Database(object): def __repr__(self): return ''.format(self.open) - def get_table_names(self, internal=False): + def get_table_names(self, internal=False, **kwargs): """Returns a list of table names for the connected database.""" # Setup SQLAlchemy for Database inspection. - return inspect(self._engine).get_table_names() + return inspect(self._engine).get_table_names(**kwargs) def get_connection(self): """Get a connection to this Database. Connections are retrieved from a