pub fn parse_filter(json_str: &str) -> Result<FilterExpr, ParseError>Expand description
Parse a Mongo-style filter from a JSON string.
This is a convenience function that calls FilterExpr::parse.
§Example
use mik_sql::prelude::*;
// Simple filter
let filter = parse_filter(r#"{"active": true}"#).unwrap();
// Complex filter with operators
let filter = parse_filter(r#"{
"status": {"$in": ["active", "pending"]},
"age": {"$gte": 18}
}"#).unwrap();
// Logical operators
let filter = parse_filter(r#"{
"$or": [
{"role": "admin"},
{"role": "moderator"}
]
}"#).unwrap();§Errors
Returns ParseError if the JSON is invalid.