MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / has_schema

Method has_schema

lib/sqlalchemy/dialects/postgresql/base.py:3779–3783  ·  view source on GitHub ↗
(self, connection, schema, **kw)

Source from the content-addressed store, hash-verified

3777
3778 @reflection.cache
3779 def has_schema(self, connection, schema, **kw):
3780 query = select(pg_catalog.pg_namespace.c.nspname).where(
3781 pg_catalog.pg_namespace.c.nspname == schema
3782 )
3783 return bool(connection.scalar(query))
3784
3785 def _pg_class_filter_scope_schema(
3786 self, query, schema, scope, pg_class_table=None

Callers

nothing calls this directly

Calls 3

selectFunction · 0.90
whereMethod · 0.45
scalarMethod · 0.45

Tested by

no test coverage detected