Spaces:
Sleeping
Sleeping
File size: 937 Bytes
aa3be69 f6dac2a aa3be69 f6dac2a aa3be69 f6dac2a aa3be69 f6dac2a aa3be69 f6dac2a aa3be69 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 | """Pipeline data-store handles.
Originally backed by Supabase Postgres; the project has since pivoted to a
single DuckDB file at `data/eqdp.duckdb`. The pipeline call sites still
import `get_supabase()` and use the supabase-py builder pattern — that
keeps working because `src.store.DuckStore` exposes the same chain.
`get_pg_conn()` is retained for legacy bulk-DDL paths (e.g. `scripts/db_push`)
and now returns a raw DuckDB connection.
"""
from __future__ import annotations
from typing import Any
from .store import DuckStore, get_store
def get_supabase() -> DuckStore:
"""Backwards-compatible name. Returns a DuckDB-backed store."""
return get_store()
def get_pg_conn(*, autocommit: bool = False) -> Any:
"""Raw DuckDB connection. `autocommit` is accepted for API parity but is
a no-op — DuckDB autocommits each statement by default."""
del autocommit
return get_store().connect(read_only=False)
|