(self)
| 3399 | return schema, tname, colname |
| 3400 | |
| 3401 | def _resolve_col_tokens(self) -> Tuple[Table, str, Optional[str]]: |
| 3402 | if self.parent is None: |
| 3403 | raise exc.InvalidRequestError( |
| 3404 | "this ForeignKey object does not yet have a " |
| 3405 | "parent Column associated with it." |
| 3406 | ) |
| 3407 | |
| 3408 | elif self.parent.table is None: |
| 3409 | raise exc.InvalidRequestError( |
| 3410 | "this ForeignKey's parent column is not yet associated " |
| 3411 | "with a Table." |
| 3412 | ) |
| 3413 | |
| 3414 | parenttable = self.parent.table |
| 3415 | |
| 3416 | if self._unresolvable: |
| 3417 | schema, tname, colname = self._column_tokens |
| 3418 | tablekey = _get_table_key(tname, schema) |
| 3419 | return parenttable, tablekey, colname |
| 3420 | |
| 3421 | # assertion |
| 3422 | # basically Column._make_proxy() sends the actual |
| 3423 | # target Column to the ForeignKey object, so the |
| 3424 | # string resolution here is never called. |
| 3425 | for c in self.parent.base_columns: |
| 3426 | if isinstance(c, Column): |
| 3427 | assert c.table is parenttable |
| 3428 | break |
| 3429 | else: |
| 3430 | assert False |
| 3431 | ###################### |
| 3432 | |
| 3433 | schema, tname, colname = self._column_tokens |
| 3434 | |
| 3435 | if schema is None and parenttable.metadata.schema is not None: |
| 3436 | schema = parenttable.metadata.schema |
| 3437 | |
| 3438 | tablekey = _get_table_key(tname, schema) |
| 3439 | return parenttable, tablekey, colname |
| 3440 | |
| 3441 | def _link_to_col_by_colstring( |
| 3442 | self, parenttable: Table, table: Table, colname: Optional[str] |
no test coverage detected