MCPcopy Create free account
hub / github.com/Graphify-Labs/graphify / _graph

Function _graph

tests/test_sql_oracle_packages.py:56–65  ·  view source on GitHub ↗
(tmp_path: Path, src: str, name: str = "pkg.sql")

Source from the content-addressed store, hash-verified

54
55
56def _graph(tmp_path: Path, src: str, name: str = "pkg.sql"):
57 path = tmp_path / name
58 path.write_text(src, encoding="utf-8")
59 result = extract_sql(path)
60 label = {n["id"]: n["label"] for n in result["nodes"]}
61 line = {n["label"]: n["source_location"] for n in result["nodes"]}
62 edges = sorted(
63 (label[e["source"]], e["relation"], label[e["target"]]) for e in result["edges"]
64 )
65 return line, edges
66
67
68def test_package_body_members_and_their_tables(tmp_path):

Calls 1

extract_sqlFunction · 0.90

Tested by

no test coverage detected