MCPcopy Create free account
hub / github.com/sqlalchemy/sqlalchemy / get_view_names

Method get_view_names

lib/sqlalchemy/dialects/mysql/base.py:3294–3309  ·  view source on GitHub ↗
(
        self, connection: Connection, schema: Optional[str] = None, **kw: Any
    )

Source from the content-addressed store, hash-verified

3292
3293 @reflection.cache
3294 def get_view_names(
3295 self, connection: Connection, schema: Optional[str] = None, **kw: Any
3296 ) -> List[str]:
3297 if schema is None:
3298 schema = self.default_schema_name
3299 assert schema is not None
3300 charset = self._connection_charset
3301 rp = connection.exec_driver_sql(
3302 "SHOW FULL TABLES FROM %s"
3303 % self.identifier_preparer.quote_identifier(schema)
3304 )
3305 return [
3306 row[0]
3307 for row in self._compat_fetchall(rp, charset=charset)
3308 if row[1] in ("VIEW", "SYSTEM VIEW")
3309 ]
3310
3311 @reflection.cache
3312 def get_table_options(

Callers

nothing calls this directly

Calls 3

_compat_fetchallMethod · 0.95
quote_identifierMethod · 0.80
exec_driver_sqlMethod · 0.45

Tested by

no test coverage detected