(self, metadata, connection)
| 310 | return actual_name, reflected_name |
| 311 | |
| 312 | def ix(self, metadata, connection): |
| 313 | convention = { |
| 314 | "ix": "index_%(table_name)s_" |
| 315 | "%(column_0_N_name)s" |
| 316 | + ( |
| 317 | "_".join( |
| 318 | "".join(random.choice("abcdef") for j in range(30)) |
| 319 | for i in range(10) |
| 320 | ) |
| 321 | ), |
| 322 | } |
| 323 | metadata.naming_convention = convention |
| 324 | |
| 325 | a = Table( |
| 326 | "a_things_with_stuff", |
| 327 | metadata, |
| 328 | Column("id_long_column_name", Integer, primary_key=True), |
| 329 | Column("id_another_long_name", Integer), |
| 330 | ) |
| 331 | cons = Index(None, a.c.id_long_column_name, a.c.id_another_long_name) |
| 332 | actual_name = cons.name |
| 333 | |
| 334 | metadata.create_all(connection) |
| 335 | insp = inspect(connection) |
| 336 | ix = insp.get_indexes("a_things_with_stuff") |
| 337 | reflected_name = ix[0]["name"] |
| 338 | return actual_name, reflected_name |
| 339 | |
| 340 | def uq(self, metadata, connection): |
| 341 | convention = { |
nothing calls this directly
no test coverage detected