MCPcopy Create free account
hub / github.com/Vanderhoof/PyDBML / delete_column

Method delete_column

pydbml/_classes/table.py:80–89  ·  view source on GitHub ↗
(self, c: Union[Column, int])

Source from the content-addressed store, hash-verified

78 self.columns.append(c)
79
80 def delete_column(self, c: Union[Column, int]) -> Column:
81 if isinstance(c, Column):
82 if c in self.columns:
83 c.table = None
84 return self.columns.pop(self.columns.index(c))
85 else:
86 raise ColumnNotFoundError(f'Column {c} if missing in the table')
87 elif isinstance(c, int):
88 self.columns[c].table = None
89 return self.columns.pop(c)
90
91 def add_index(self, i: Index) -> None:
92 '''

Callers 2

test_delete_columnMethod · 0.95

Calls 1

ColumnNotFoundErrorClass · 0.90

Tested by 2

test_delete_columnMethod · 0.76