Enhanced fast path SELECT execution with parameters
(
conn: &Connection,
query: &str,
params: &[rusqlite::types::Value],
schema_cache: &SchemaCache,
)
| 547 | |
| 548 | /// Enhanced fast path SELECT execution with parameters |
| 549 | pub fn query_fast_path_enhanced_with_params( |
| 550 | conn: &Connection, |
| 551 | query: &str, |
| 552 | params: &[rusqlite::types::Value], |
| 553 | schema_cache: &SchemaCache, |
| 554 | ) -> Result<Option<DbResponse>, rusqlite::Error> { |
| 555 | // Try enhanced fast path detection |
| 556 | if let Some(fast_query) = can_use_fast_path_enhanced(query) { |
| 557 | // Only handle SELECT queries |
| 558 | if !matches!(fast_query.operation, FastPathOperation::Select) { |
| 559 | return Ok(None); |
| 560 | } |
| 561 | |
| 562 | // Check if table has decimal columns |
| 563 | match table_has_decimal_columns(conn, &fast_query.table_name, schema_cache) { |
| 564 | Ok(false) => { |
| 565 | return execute_fast_select_with_params(conn, query, &fast_query.table_name, params, schema_cache); |
| 566 | } |
| 567 | _ => { |
| 568 | // Has decimal columns or error checking, fall back to normal path |
| 569 | return Ok(None); |
| 570 | } |
| 571 | } |
| 572 | } |
| 573 | |
| 574 | Ok(None) |
| 575 | } |
| 576 | |
| 577 | /// Enhanced fast path SELECT execution that supports WHERE clauses |
| 578 | pub fn query_fast_path_enhanced( |
nothing calls this directly
no test coverage detected