MCPcopy Create free account
hub / github.com/FlyingFeather/DEA-SQL / exec_on_db

Function exec_on_db

evaluation/test-suite-sql-eval/exec_eval.py:160–168  ·  view source on GitHub ↗
(
    sqlite_path: str, query: str, process_id: str = "", timeout: int = TIMEOUT
)

Source from the content-addressed store, hash-verified

158
159
160async def exec_on_db(
161 sqlite_path: str, query: str, process_id: str = "", timeout: int = TIMEOUT
162) -> Tuple[str, Any]:
163 try:
164 return await asyncio.wait_for(exec_on_db_(sqlite_path, query), timeout)
165 except asyncio.TimeoutError:
166 return ('exception', TimeoutError)
167 except Exception as e:
168 return ("exception", e)
169
170
171# postprocess the model predictions to avoid execution errors

Callers 2

judgeFunction · 0.90
eval_exec_matchFunction · 0.85

Calls 1

exec_on_db_Function · 0.70

Tested by

no test coverage detected