pub trait QueryRunner:
Send
+ Sync
+ 'static {
// Required methods
fn execute(
&self,
query: &str,
options: Option<ExecuteOptions>,
) -> Result<QueryResult, LoraError>;
fn explain(
&self,
query: &str,
params: Option<BTreeMap<String, LoraValue>>,
) -> Result<QueryPlan, LoraError>;
fn profile(
&self,
query: &str,
params: Option<BTreeMap<String, LoraValue>>,
) -> Result<QueryProfile, LoraError>;
}Expand description
Minimal abstraction any transport can depend on to run Lora queries.
execute runs a query and returns rows. explain and profile are
deliberately separate methods: explain never invokes the executor
(so it can be called on mutating queries without side effects) and
profile runs the executor and reports runtime metrics. Transports
MUST NOT route plan / profile requests through execute — exposing
the plan-only and profile-with-metrics behaviours as separate
methods is part of the public contract.