(self, metadata, connection)
| 282 | return actual_name, None |
| 283 | |
| 284 | def pk(self, metadata, connection): |
| 285 | convention = { |
| 286 | "pk": "primary_key_%(table_name)s_" |
| 287 | "%(column_0_N_name)s" |
| 288 | + ( |
| 289 | "_".join( |
| 290 | "".join(random.choice("abcdef") for j in range(30)) |
| 291 | for i in range(10) |
| 292 | ) |
| 293 | ), |
| 294 | } |
| 295 | metadata.naming_convention = convention |
| 296 | |
| 297 | a = Table( |
| 298 | "a_things_with_stuff", |
| 299 | metadata, |
| 300 | Column("id_long_column_name", Integer, primary_key=True), |
| 301 | Column("id_another_long_name", Integer, primary_key=True), |
| 302 | ) |
| 303 | cons = a.primary_key |
| 304 | actual_name = cons.name |
| 305 | |
| 306 | metadata.create_all(connection) |
| 307 | insp = inspect(connection) |
| 308 | pk = insp.get_pk_constraint("a_things_with_stuff") |
| 309 | reflected_name = pk["name"] |
| 310 | return actual_name, reflected_name |
| 311 | |
| 312 | def ix(self, metadata, connection): |
| 313 | convention = { |
nothing calls this directly
no test coverage detected