0xMiden / 0xMiden/node

Remove or fix `query_plan` module

未关闭
#2,017 4 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
store
主要语言
Rust
星标
104
派生
138
平均合并
1 天 13 小时
30 天内合并 PR
56

描述

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.

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。