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

Method add_column

pydbml/_classes/table.py:70–78  ·  view source on GitHub ↗

Adds column to self.columns attribute and sets in this column the `table` attribute.

(self, c: Column)

Source from the content-addressed store, hash-verified

68 return sum(c.pk for c in self.columns) > 1
69
70 def add_column(self, c: Column) -> None:
71 '''
72 Adds column to self.columns attribute and sets in this column the
73 `table` attribute.
74 '''
75 if not isinstance(c, Column):
76 raise TypeError('Columns must be of type Column')
77 c.table = self
78 self.columns.append(c)
79
80 def delete_column(self, c: Union[Column, int]) -> Column:
81 if isinstance(c, Column):

Callers 15

test_add_tableMethod · 0.95
test_add_table_aliasMethod · 0.95
test_add_table_badMethod · 0.95
test_delete_tableMethod · 0.95
test_add_referenceMethod · 0.95
test_delete_referenceMethod · 0.95
test_deleteMethod · 0.95
create_databaseMethod · 0.95
test_getitemMethod · 0.95

Calls

no outgoing calls

Tested by 15

test_add_tableMethod · 0.76
test_add_table_aliasMethod · 0.76
test_add_table_badMethod · 0.76
test_delete_tableMethod · 0.76
test_add_referenceMethod · 0.76
test_delete_referenceMethod · 0.76
test_deleteMethod · 0.76
create_databaseMethod · 0.76
test_getitemMethod · 0.76