Skip to content

Commit

Permalink
fix: standardize list_tables signature everywhere
Browse files Browse the repository at this point in the history
Fixes ibis-project#2877 -- most of the differing signatures were removed in earlier
refactors -- this is the only one left (except for a mock fixture in the
test suite)
  • Loading branch information
gforsyth committed Nov 7, 2022
1 parent 7bd7a6b commit be0651a
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions ibis/backends/base/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,15 +147,17 @@ def table(self, name: str) -> ir.Table:
qualified_name = self._qualify(name)
return self.client.table(qualified_name, self.name)

def list_tables(self, like=None):
def list_tables(self, like=None, database=None):
"""List the tables in the database.
Parameters
----------
like
A pattern to use for listing tables.
database
The database to perform the list against
"""
return self.client.list_tables(like, database=self.name)
return self.client.list_tables(like, database=database or self.name)


class TablesAccessor(collections.abc.Mapping):
Expand Down

0 comments on commit be0651a

Please sign in to comment.