fix(core): preserve adapter command contracts
This commit is contained in:
@@ -13,15 +13,15 @@ from tht.execute import (
|
||||
DEFAULT_TIMEOUT_MS = 30_000
|
||||
|
||||
|
||||
def run_query(engine: Engine, sql: str, *, limit: int) -> ExecResult:
|
||||
def run_query(engine: Engine, sql: str, *, limit: int, timeout_ms: int = DEFAULT_TIMEOUT_MS) -> ExecResult:
|
||||
limit = require_positive_int(limit, name="limit")
|
||||
return run_controlled(
|
||||
engine,
|
||||
sql,
|
||||
limit=limit,
|
||||
timeout_ms=DEFAULT_TIMEOUT_MS,
|
||||
timeout_ms=timeout_ms,
|
||||
)
|
||||
|
||||
|
||||
def explain(engine: Engine, sql: str) -> PlanSummary:
|
||||
return _explain(engine, sql, timeout_ms=DEFAULT_TIMEOUT_MS)
|
||||
def explain(engine: Engine, sql: str, *, timeout_ms: int = DEFAULT_TIMEOUT_MS) -> PlanSummary:
|
||||
return _explain(engine, sql, timeout_ms=timeout_ms)
|
||||
|
||||
Reference in New Issue
Block a user