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

Method has_schema

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

Source from the content-addressed store, hash-verified

3630
3631 @reflection.cache
3632 def has_schema(self, connection, schema, **kw):
3633 query = select(pg_catalog.pg_namespace.c.nspname).where(
3634 pg_catalog.pg_namespace.c.nspname == schema
3635 )
3636 return bool(connection.scalar(query))
3637
3638 def _pg_class_filter_scope_schema(
3639 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