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

Method add_table_group

pydbml/database.py:121–130  ·  view source on GitHub ↗
(self, obj: TableGroup)

Source from the content-addressed store, hash-verified

119 return obj
120
121 def add_table_group(self, obj: TableGroup) -> TableGroup:
122 if obj in self.table_groups:
123 raise DatabaseValidationError(f'{obj} is already in the database.')
124 for table_group in self.table_groups:
125 if table_group.name == obj.name:
126 raise DatabaseValidationError(f'TableGroup {obj.name} is already in the database.')
127
128 self._set_database(obj)
129 self.table_groups.append(obj)
130 return obj
131
132 def add_project(self, obj: Project) -> Project:
133 if self.project:

Callers 4

test_add_table_groupMethod · 0.95
addMethod · 0.95

Calls 2

_set_databaseMethod · 0.95

Tested by 3

test_add_table_groupMethod · 0.76