(self)
| 3096 | return schema, tname, colname |
| 3097 | |
| 3098 | def _resolve_col_tokens(self) -> Tuple[Table, str, Optional[str]]: |
| 3099 | if self.parent is None: |
| 3100 | raise exc.InvalidRequestError( |
| 3101 | "this ForeignKey object does not yet have a " |
| 3102 | "parent Column associated with it." |
| 3103 | ) |
| 3104 | |
| 3105 | elif self.parent.table is None: |
| 3106 | raise exc.InvalidRequestError( |
| 3107 | "this ForeignKey's parent column is not yet associated " |
| 3108 | "with a Table." |
| 3109 | ) |
| 3110 | |
| 3111 | parenttable = self.parent.table |
| 3112 | |
| 3113 | if self._unresolvable: |
| 3114 | schema, tname, colname = self._column_tokens |
| 3115 | tablekey = _get_table_key(tname, schema) |
| 3116 | return parenttable, tablekey, colname |
| 3117 | |
| 3118 | # assertion |
| 3119 | # basically Column._make_proxy() sends the actual |
| 3120 | # target Column to the ForeignKey object, so the |
| 3121 | # string resolution here is never called. |
| 3122 | for c in self.parent.base_columns: |
| 3123 | if isinstance(c, Column): |
| 3124 | assert c.table is parenttable |
| 3125 | break |
| 3126 | else: |
| 3127 | assert False |
| 3128 | ###################### |
| 3129 | |
| 3130 | schema, tname, colname = self._column_tokens |
| 3131 | |
| 3132 | if schema is None and parenttable.metadata.schema is not None: |
| 3133 | schema = parenttable.metadata.schema |
| 3134 | |
| 3135 | tablekey = _get_table_key(tname, schema) |
| 3136 | return parenttable, tablekey, colname |
| 3137 | |
| 3138 | def _link_to_col_by_colstring( |
| 3139 | self, parenttable: Table, table: Table, colname: Optional[str] |
no test coverage detected