MCPcopy Create free account
hub / github.com/erans/pgsqlite / execute_with_cached_plan

Method execute_with_cached_plan

src/optimization/read_only_optimizer.rs:301–314  ·  view source on GitHub ↗

Execute query using cached plan

(
        &self,
        conn: &Connection,
        plan: &CachedQueryPlan,
        query: &str,
    )

Source from the content-addressed store, hash-verified

299
300 /// Execute query using cached plan
301 fn execute_with_cached_plan(
302 &self,
303 conn: &Connection,
304 plan: &CachedQueryPlan,
305 query: &str,
306 ) -> Result<Option<DbResponse>, rusqlite::Error> {
307 // For simple queries, use direct execution
308 if matches!(plan.complexity, QueryComplexity::Simple) {
309 return self.execute_simple_query_direct(conn, query, plan);
310 }
311
312 // For more complex queries, use optimized execution
313 self.execute_optimized_query(conn, query, plan)
314 }
315
316 /// Execute simple query directly with minimal overhead
317 fn execute_simple_query_direct(

Callers 1

Calls 2

Tested by

no test coverage detected