MCPcopy Create free account
hub / github.com/carsonpo/haystackdb / handle_query

Function handle_query

tests/filters.rs:19–22  ·  view source on GitHub ↗
(json_query: &str, index: &mut InvertedIndex)

Source from the content-addressed store, hash-verified

17}
18
19fn handle_query(json_query: &str, index: &mut InvertedIndex) -> Filters {
20 let query: Query = serde_json::from_str(json_query).expect("Failed to parse query");
21 Filters::evaluate(&query.filters, index)
22}
23
24#[cfg(test)]
25mod filters_tests {

Callers 7

test_basic_and_queryFunction · 0.85
test_empty_queryFunction · 0.85
test_nonexistent_keyFunction · 0.85
test_single_eqFunction · 0.85
test_single_inFunction · 0.85
test_combined_andFunction · 0.85
test_complex_orFunction · 0.85

Calls

no outgoing calls

Tested by 7

test_basic_and_queryFunction · 0.68
test_empty_queryFunction · 0.68
test_nonexistent_keyFunction · 0.68
test_single_eqFunction · 0.68
test_single_inFunction · 0.68
test_combined_andFunction · 0.68
test_complex_orFunction · 0.68