Return a Unicode SHOW TABLES from a given schema.
(
self, connection: Connection, schema: Optional[str] = None, **kw: Any
)
| 3218 | |
| 3219 | @reflection.cache |
| 3220 | def get_table_names( |
| 3221 | self, connection: Connection, schema: Optional[str] = None, **kw: Any |
| 3222 | ) -> list[str]: |
| 3223 | """Return a Unicode SHOW TABLES from a given schema.""" |
| 3224 | if schema is not None: |
| 3225 | current_schema: str = schema |
| 3226 | else: |
| 3227 | current_schema = self.default_schema_name # type: ignore |
| 3228 | |
| 3229 | charset = self._connection_charset |
| 3230 | |
| 3231 | rp = connection.exec_driver_sql( |
| 3232 | "SHOW FULL TABLES FROM %s" |
| 3233 | % self.identifier_preparer.quote_identifier(current_schema) |
| 3234 | ) |
| 3235 | |
| 3236 | return [ |
| 3237 | row[0] |
| 3238 | for row in self._compat_fetchall(rp, charset=charset) |
| 3239 | if row[1] == "BASE TABLE" |
| 3240 | ] |
| 3241 | |
| 3242 | @reflection.cache |
| 3243 | def get_view_names( |
nothing calls this directly
no test coverage detected