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

Method _can_drop_sequence

lib/sqlalchemy/sql/ddl.py:1176–1186  ·  view source on GitHub ↗
(self, sequence)

Source from the content-addressed store, hash-verified

1174 )
1175
1176 def _can_drop_sequence(self, sequence):
1177 effective_schema = self.connection.schema_for_object(sequence)
1178 return self.dialect.supports_sequences and (
1179 (not self.dialect.sequences_optional or not sequence.optional)
1180 and (
1181 not self.checkfirst
1182 or self.dialect.has_sequence(
1183 self.connection, sequence.name, schema=effective_schema
1184 )
1185 )
1186 )
1187
1188 def visit_index(self, index, drop_ok=False):
1189 if not drop_ok and not self._can_drop_index(index):

Callers 2

visit_metadataMethod · 0.95
visit_sequenceMethod · 0.95

Calls 2

schema_for_objectMethod · 0.45
has_sequenceMethod · 0.45

Tested by

no test coverage detected