(
self,
column: ColumnClause[Any],
*,
index: Optional[int] = None,
replace_existing: bool = False,
)
| 1424 | self._extra_dependencies.add(table) |
| 1425 | |
| 1426 | def _insert_col_impl( |
| 1427 | self, |
| 1428 | column: ColumnClause[Any], |
| 1429 | *, |
| 1430 | index: Optional[int] = None, |
| 1431 | replace_existing: bool = False, |
| 1432 | ) -> None: |
| 1433 | try: |
| 1434 | column._set_parent_with_dispatch( |
| 1435 | self, |
| 1436 | allow_replacements=replace_existing, |
| 1437 | all_names={c.name: c for c in self.c}, |
| 1438 | index=index, |
| 1439 | ) |
| 1440 | except exc.DuplicateColumnError as de: |
| 1441 | raise exc.DuplicateColumnError( |
| 1442 | f"{de.args[0]} Specify replace_existing=True to " |
| 1443 | "Table.append_column() or Table.insert_column() to replace an " |
| 1444 | "existing column." |
| 1445 | ) from de |
| 1446 | |
| 1447 | def insert_column( |
| 1448 | self, |
no test coverage detected