Adds index to self.indexes attribute and sets in this index the `table` attribute.
(self, i: Index)
| 89 | return self.columns.pop(c) |
| 90 | |
| 91 | def add_index(self, i: Index) -> None: |
| 92 | ''' |
| 93 | Adds index to self.indexes attribute and sets in this index the |
| 94 | `table` attribute. |
| 95 | ''' |
| 96 | if not isinstance(i, Index): |
| 97 | raise TypeError('Indexes must be of type Index') |
| 98 | for subject in i.subjects: |
| 99 | if isinstance(subject, Column) and subject.table is not self: |
| 100 | raise ColumnNotFoundError(f'Column {subject} not in the table') |
| 101 | i.table = self |
| 102 | self.indexes.append(i) |
| 103 | |
| 104 | def delete_index(self, i: Union[Index, int]) -> Index: |
| 105 | if isinstance(i, Index): |