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

Function parse_table_group

pydbml/definitions/table_group.py:37–57  ·  view source on GitHub ↗

TableGroup tablegroup_name { table1 table2 table3 }

(s, loc, tok)

Source from the content-addressed store, hash-verified

35
36
37def parse_table_group(s, loc, tok):
38 '''
39 TableGroup tablegroup_name {
40 table1
41 table2
42 table3
43 }
44 '''
45 init_dict = {
46 'name': tok['name'],
47 'items': list(tok.get('items', []))
48 }
49 if 'comment_before' in tok:
50 comment = '\n'.join(c[0] for c in tok['comment_before'])
51 init_dict['comment'] = comment
52 if 'note' in tok:
53 note = tok['note']
54 init_dict['note'] = note if isinstance(note, NoteBlueprint) else note[0]
55 if 'color' in tok:
56 init_dict['color'] = tok['color']
57 return TableGroupBlueprint(**init_dict)
58
59
60table_group.set_parse_action(parse_table_group)

Callers

nothing calls this directly

Calls 2

TableGroupBlueprintClass · 0.90
getMethod · 0.80

Tested by

no test coverage detected