Download src/query/executor/base.py from DataEyond/Agentic-Service-Data-Eyond-Catalog: direct link, hf CLI and curl.
- Browser
- Download file 766 Bytes
-
https://huggingface.co/spaces/DataEyond/Agentic-Service-Data-Eyond-Catalog/resolve/refs%2Fpr%2F2/src/query/executor/base.py
- Command line
-
hf download hf://spaces/DataEyond/Agentic-Service-Data-Eyond-Catalog@refs/pr/2/src/query/executor/base.py
-
curl -L -o base.py https://huggingface.co/spaces/DataEyond/Agentic-Service-Data-Eyond-Catalog/resolve/refs%2Fpr%2F2/src/query/executor/base.py
766 Bytes
| """BaseExecutor + QueryResult — uniform return shape across DB and tabular paths.""" | |
| from abc import ABC, abstractmethod | |
| from dataclasses import dataclass, field | |
| from typing import Any | |
| from ..ir.models import QueryIR | |
| class QueryResult: | |
| source_id: str | |
| backend: str # "sql" | "tabular" | |
| columns: list[str] = field(default_factory=list) | |
| rows: list[dict[str, Any]] = field(default_factory=list) | |
| row_count: int = 0 | |
| truncated: bool = False | |
| elapsed_ms: int = 0 | |
| error: str | None = None | |
| table_id: str = "" | |
| table_name: str = "" | |
| source_name: str = "" | |
| class BaseExecutor(ABC): | |
| """Subclasses: DbExecutor, TabularExecutor.""" | |
| async def run(self, ir: QueryIR) -> QueryResult: | |
| ... | |