0xMiden / 0xMiden/node

Remove or fix `query_plan` module

Abierto
#2,017 4 comentarios 0 reacciones 0 asignados Ver en GitHub
store
Lenguaje dominante
Rust
Estrellas
104
Forks
138
Merge medio
1 d 13 h
PR fusionados (30 d)
56

Descripción

The query-plan check was meant to be a test-time guard against accidental full table scans.

Originally the flow was roughly:
- Store queries used the repo’s custom `Transaction` wrapper around `rusqlite::Transaction`.
- Queries prepared SQL through `Transaction::prepare_cached(sql)`.
- In `#[cfg(test)]`, `prepare_cached` called `self.check_query_plan(sql)`.
- check_query_plan ran: `EXPLAIN QUERY PLAN `. It rendered SQLite’s plan and failed the test if it found an unnecessary `SCAN`, while allowing indexed scans like `SCAN ... USING INDEX`.

After the migration to Diesel this is effectively orphaned. We should either find a way to perform the same checks with Diesel or remove this orphaned module entirely.

Guía de contribución

Abrir la guía de contribución

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.