Return a Unicode SHOW TABLES from a given schema.
(
self, connection: Connection, schema: Optional[str] = None, **kw: Any
)
| 3269 | |
| 3270 | @reflection.cache |
| 3271 | def get_table_names( |
| 3272 | self, connection: Connection, schema: Optional[str] = None, **kw: Any |
| 3273 | ) -> List[str]: |
| 3274 | """Return a Unicode SHOW TABLES from a given schema.""" |
| 3275 | if schema is not None: |
| 3276 | current_schema: str = schema |
| 3277 | else: |
| 3278 | current_schema = self.default_schema_name # type: ignore |
| 3279 | |
| 3280 | charset = self._connection_charset |
| 3281 | |
| 3282 | rp = connection.exec_driver_sql( |
| 3283 | "SHOW FULL TABLES FROM %s" |
| 3284 | % self.identifier_preparer.quote_identifier(current_schema) |
| 3285 | ) |
| 3286 | |
| 3287 | return [ |
| 3288 | row[0] |
| 3289 | for row in self._compat_fetchall(rp, charset=charset) |
| 3290 | if row[1] == "BASE TABLE" |
| 3291 | ] |
| 3292 | |
| 3293 | @reflection.cache |
| 3294 | def get_view_names( |
nothing calls this directly
no test coverage detected