(element, compiler, **kw)
| 4745 | def test_custom_create(self): |
| 4746 | @compiles(schema.CreateColumn) |
| 4747 | def compile_(element, compiler, **kw): |
| 4748 | column = element.element |
| 4749 | |
| 4750 | if "special" not in column.info: |
| 4751 | return compiler.visit_create_column(element, **kw) |
| 4752 | |
| 4753 | text = "%s SPECIAL DIRECTIVE %s" % ( |
| 4754 | column.name, |
| 4755 | compiler.type_compiler.process(column.type), |
| 4756 | ) |
| 4757 | default = compiler.get_column_default_string(column) |
| 4758 | if default is not None: |
| 4759 | text += " DEFAULT " + default |
| 4760 | |
| 4761 | if not column.nullable: |
| 4762 | text += " NOT NULL" |
| 4763 | |
| 4764 | if column.constraints: |
| 4765 | text += " ".join( |
| 4766 | compiler.process(const) for const in column.constraints |
| 4767 | ) |
| 4768 | return text |
| 4769 | |
| 4770 | t = Table( |
| 4771 | "mytable", |
nothing calls this directly
no test coverage detected