MCPcopy Create free account
hub / github.com/CodeGraphContext/CodeGraphContext / _meta

Function _meta

src/codegraphcontext/viz/server.py:130–139  ·  view source on GitHub ↗

Read a KùzuDB/LadybugDB internal dict field regardless of its casing. KùzuDB spells these fields lowercase (_label/_src/_dst); LadybugDB spells the same fields uppercase (_LABEL/_SRC/_DST) — confirmed against a live query on each embedded backend. Keying on one casing only silently drop

(d: dict, name: str)

Source from the content-addressed store, hash-verified

128
129
130def _meta(d: dict, name: str):
131 """Read a KùzuDB/LadybugDB internal dict field regardless of its casing.
132
133 KùzuDB spells these fields lowercase (_label/_src/_dst); LadybugDB spells
134 the same fields uppercase (_LABEL/_SRC/_DST) — confirmed against a live
135 query on each embedded backend. Keying on one casing only silently drops
136 every row on the other backend.
137 """
138 lower = f"_{name}"
139 return d[lower] if lower in d else d.get(f"_{name.upper()}")
140
141
142@app.get("/api/graph")

Callers 3

get_graphFunction · 0.70
parse_nodeFunction · 0.70
parse_relFunction · 0.70

Calls 1

getMethod · 0.65

Tested by

no test coverage detected