MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / get_view_names

Method get_view_names

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

Source from the content-addressed store, hash-verified

3241
3242 @reflection.cache
3243 def get_view_names(
3244 self, connection: Connection, schema: Optional[str] = None, **kw: Any
3245 ) -> list[str]:
3246 if schema is None:
3247 schema = self.default_schema_name
3248 assert schema is not None
3249 charset = self._connection_charset
3250 rp = connection.exec_driver_sql(
3251 "SHOW FULL TABLES FROM %s"
3252 % self.identifier_preparer.quote_identifier(schema)
3253 )
3254 return [
3255 row[0]
3256 for row in self._compat_fetchall(rp, charset=charset)
3257 if row[1] in ("VIEW", "SYSTEM VIEW")
3258 ]
3259
3260 @reflection.cache
3261 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