Find potential cache hits for EXISTS subqueries
(&self, subquery_hash: u64)
| 493 | |
| 494 | /// Find potential cache hits for EXISTS subqueries |
| 495 | pub fn find_boolean_matches(&self, subquery_hash: u64) -> Vec<(SubqueryCacheKey, bool)> { |
| 496 | let mut matches = Vec::new(); |
| 497 | |
| 498 | if let Some(keys) = self.boolean_index.read().unwrap().get(&subquery_hash) { |
| 499 | let entries = self.entries.read().unwrap(); |
| 500 | |
| 501 | for key in keys { |
| 502 | if let Some(entry) = entries.get(key) { |
| 503 | if entry.is_valid() { |
| 504 | if let Some(boolean_result) = entry.result.as_boolean() { |
| 505 | matches.push((key.clone(), boolean_result)); |
| 506 | } |
| 507 | } |
| 508 | } |
| 509 | } |
| 510 | } |
| 511 | |
| 512 | matches |
| 513 | } |
| 514 | |
| 515 | /// Invalidate entries by graph version |
| 516 | pub fn invalidate_by_graph_version(&self, version: u64) { |
no test coverage detected