0xMiden / 0xMiden/node

Remove or fix `query_plan` module

Đang mở
#2,017 4 bình luận 0 reaction 0 người được giao Xem trên GitHub
store
Ngôn ngữ chính
Rust
Star
104
Fork
138
Merge trung bình
1 ngày 13 giờ
Pull request đã merge (30 ngày)
56

Mô tả

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.

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.