duckdb / duckdb-rs

Ergonomic bindings to duckdb for Rust
MIT License
511 stars 113 forks source link

Why remove the prepared statements from cache? #391

Open domoritz opened 2 weeks ago

domoritz commented 2 weeks ago

Maybe I am misunderstanding the logic here but I wonder why duckdb removes the statement from the cache instead of just getting it? I would expect a call to https://paritytech.github.io/try-runtime-cli/hashlink/lru_cache/struct.LruCache.html#method.get.

https://github.com/duckdb/duckdb-rs/blame/2bd811e7b1b7398c4f461de4de263e629572dc90/crates/duckdb/src/cache.rs#L142