(self)
| 158 | __requires__ = ("identity_columns_standard",) |
| 159 | |
| 160 | def test_on_null(self): |
| 161 | t = Table( |
| 162 | "foo_table", |
| 163 | MetaData(), |
| 164 | Column( |
| 165 | "foo", |
| 166 | Integer(), |
| 167 | Identity(always=False, on_null=True, start=42, cycle=True), |
| 168 | ), |
| 169 | ) |
| 170 | text = " ON NULL" if testing.against("oracle") else "" |
| 171 | self.assert_compile( |
| 172 | CreateTable(t), |
| 173 | ( |
| 174 | "CREATE TABLE foo_table (foo INTEGER GENERATED BY DEFAULT" |
| 175 | + text |
| 176 | + " AS IDENTITY (START WITH 42 CYCLE))" |
| 177 | ), |
| 178 | ) |
| 179 | |
| 180 | |
| 181 | class DefaultDialectIdentityDDL(_IdentityDDLFixture, fixtures.TestBase): |
nothing calls this directly
no test coverage detected