MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / _can_drop_sequence

Method _can_drop_sequence

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

Source from the content-addressed store, hash-verified

1642 )
1643
1644 def _can_drop_sequence(self, sequence):
1645 effective_schema = self.connection.schema_for_object(sequence)
1646 return self.dialect.supports_sequences and (
1647 (not self.dialect.sequences_optional or not sequence.optional)
1648 and (
1649 not self.checkfirst & CheckFirst.SEQUENCES
1650 or self.dialect.has_sequence(
1651 self.connection, sequence.name, schema=effective_schema
1652 )
1653 )
1654 )
1655
1656 def visit_index(self, index, drop_ok=False):
1657 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