(self, src_table, type_: testing.Variation)
| 40 | |
| 41 | @testing.variation("type_", ["create_table_as", "create_view"]) |
| 42 | def test_basic_element(self, src_table, type_: testing.Variation): |
| 43 | src = src_table |
| 44 | if type_.create_table_as: |
| 45 | stmt = CreateTableAs( |
| 46 | select(src.c.id, src.c.name), |
| 47 | "dst", |
| 48 | ) |
| 49 | elif type_.create_view: |
| 50 | stmt = CreateView( |
| 51 | select(src.c.id, src.c.name), |
| 52 | "dst", |
| 53 | ) |
| 54 | else: |
| 55 | type_.fail() |
| 56 | |
| 57 | self.assert_compile( |
| 58 | stmt, |
| 59 | f'CREATE {"TABLE" if type_.create_table_as else "VIEW"} ' |
| 60 | f"dst AS SELECT src.id, src.name FROM src", |
| 61 | ) |
| 62 | |
| 63 | @testing.variation("type_", ["create_table_as", "create_view"]) |
| 64 | def test_schema_element_qualified( |
nothing calls this directly
no test coverage detected