(self, drop, **kw)
| 7084 | return text + self.preparer.format_sequence(drop.element) |
| 7085 | |
| 7086 | def visit_drop_constraint(self, drop, **kw): |
| 7087 | constraint = drop.element |
| 7088 | if constraint.name is not None: |
| 7089 | formatted_name = self.preparer.format_constraint(constraint) |
| 7090 | else: |
| 7091 | formatted_name = None |
| 7092 | |
| 7093 | if formatted_name is None: |
| 7094 | raise exc.CompileError( |
| 7095 | "Can't emit DROP CONSTRAINT for constraint %r; " |
| 7096 | "it has no name" % drop.element |
| 7097 | ) |
| 7098 | return "ALTER TABLE %s DROP CONSTRAINT %s%s%s" % ( |
| 7099 | self.preparer.format_table(drop.element.table), |
| 7100 | "IF EXISTS " if drop.if_exists else "", |
| 7101 | formatted_name, |
| 7102 | " CASCADE" if drop.cascade else "", |
| 7103 | ) |
| 7104 | |
| 7105 | def get_column_specification(self, column, **kwargs): |
| 7106 | colspec = ( |
nothing calls this directly
no test coverage detected