Parse a query plan from JSON.
(json: &str)
| 450 | |
| 451 | /// Parse a query plan from JSON. |
| 452 | pub fn parse_plan(json: &str) -> Result<QueryPlan, RepositoryError> { |
| 453 | serde_json::from_str(json) |
| 454 | .map_err(|e| RepositoryError::Serialization(format!("Invalid query plan: {}", e))) |
| 455 | } |
| 456 | |
| 457 | #[cfg(test)] |
| 458 | mod tests { |
no outgoing calls