MCPcopy Index your code
hub / github.com/Vanderhoof/PyDBML / parse_file

Method parse_file

pydbml/parser/parser.py:101–109  ·  view source on GitHub ↗
(file: Union[str, Path, TextIOWrapper])

Source from the content-addressed store, hash-verified

99
100 @staticmethod
101 def parse_file(file: Union[str, Path, TextIOWrapper]) -> Database:
102 if isinstance(file, TextIOWrapper):
103 source = file.read()
104 else:
105 with open(file, encoding="utf8") as f:
106 source = f.read()
107 source = remove_bom(source)
108 parser = PyDBMLParser(source)
109 return parser.parse()
110
111
112class PyDBMLParser:

Callers 15

test_exampleMethod · 0.80
test_projectMethod · 0.80
test_table_definitionMethod · 0.80
test_table_aliasMethod · 0.80
test_table_notesMethod · 0.80
test_column_settingsMethod · 0.80
test_default_valueMethod · 0.80
test_index_definitionMethod · 0.80
test_relationshipsMethod · 0.80
test_note_definitionMethod · 0.80

Calls 3

parseMethod · 0.95
remove_bomFunction · 0.90
PyDBMLParserClass · 0.85

Tested by 15

test_exampleMethod · 0.64
test_projectMethod · 0.64
test_table_definitionMethod · 0.64
test_table_aliasMethod · 0.64
test_table_notesMethod · 0.64
test_column_settingsMethod · 0.64
test_default_valueMethod · 0.64
test_index_definitionMethod · 0.64
test_relationshipsMethod · 0.64
test_note_definitionMethod · 0.64