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)
| 128 | |
| 129 | |
| 130 | def _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") |
no test coverage detected