(self, drop, **kw)
| 7369 | return text + self.preparer.format_sequence(drop.element) |
| 7370 | |
| 7371 | def visit_drop_constraint(self, drop, **kw): |
| 7372 | constraint = drop.element |
| 7373 | if constraint.name is not None: |
| 7374 | formatted_name = self.preparer.format_constraint(constraint) |
| 7375 | else: |
| 7376 | formatted_name = None |
| 7377 | |
| 7378 | if formatted_name is None: |
| 7379 | raise exc.CompileError( |
| 7380 | "Can't emit DROP CONSTRAINT for constraint %r; " |
| 7381 | "it has no name" % drop.element |
| 7382 | ) |
| 7383 | return "ALTER TABLE %s DROP CONSTRAINT %s%s%s" % ( |
| 7384 | self.preparer.format_table(drop.element.table), |
| 7385 | "IF EXISTS " if drop.if_exists else "", |
| 7386 | formatted_name, |
| 7387 | " CASCADE" if drop.cascade else "", |
| 7388 | ) |
| 7389 | |
| 7390 | def get_column_specification( |
| 7391 | self, column: Column[Any], **kwargs: Any |
nothing calls this directly
no test coverage detected