MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / has_sequence

Method has_sequence

lib/sqlalchemy/dialects/postgresql/base.py:3836–3844  ·  view source on GitHub ↗
(self, connection, sequence_name, schema=None, **kw)

Source from the content-addressed store, hash-verified

3834
3835 @reflection.cache
3836 def has_sequence(self, connection, sequence_name, schema=None, **kw):
3837 query = select(pg_catalog.pg_class.c.relname).where(
3838 pg_catalog.pg_class.c.relkind == "S",
3839 pg_catalog.pg_class.c.relname == sequence_name,
3840 )
3841 query = self._pg_class_filter_scope_schema(
3842 query, schema, scope=ObjectScope.ANY
3843 )
3844 return bool(connection.scalar(query))
3845
3846 @reflection.cache
3847 def has_type(self, connection, type_name, schema=None, **kw):

Callers

nothing calls this directly

Calls 4

selectFunction · 0.90
whereMethod · 0.45
scalarMethod · 0.45

Tested by

no test coverage detected