CoolFace
Apppublic

Kalletlamadhav/sql_optimized_env_new

sourceHugging Faceupdated 5mo agoView on Hugging Face
0likes
_schema_loader.py18 linesDownload Raw Back to tasks
1# tasks/_schema_loader.py2"""3Centralised schema file loader — always uses absolute paths4so tasks work regardless of CWD.5"""6 7from pathlib import Path8 9_SCHEMA_DIR = Path(__file__).resolve().parent.parent / "data" / "schemas"10 11 12def load_schema(filename: str) -> str:13    """Return the DDL text for *filename*, or an inline fallback."""14    path = _SCHEMA_DIR / filename15    if path.is_file():16        return path.read_text(encoding="utf-8")17    return f"-- Schema file not found: {filename}\n"18