(visitor: &mut V, plan: &SqlPlan)
| 4 | use crate::types::SqlPlan; |
| 5 | |
| 6 | pub fn dispatch<V: PlanVisitor>(visitor: &mut V, plan: &SqlPlan) -> Result<V::Output, V::Error> { |
| 7 | match plan { |
| 8 | SqlPlan::ConstantResult { columns, values } => visitor.constant_result(columns, values), |
| 9 | SqlPlan::Scan { |
| 10 | collection, |
| 11 | alias, |
| 12 | engine, |
| 13 | filters, |
| 14 | projection, |
| 15 | sort_keys, |
| 16 | limit, |
| 17 | offset, |
| 18 | distinct, |
| 19 | window_functions, |
| 20 | temporal, |
| 21 | } => visitor.scan( |
| 22 | collection, |
| 23 | alias.as_deref(), |
| 24 | *engine, |
| 25 | filters, |
| 26 | projection, |
| 27 | sort_keys, |
| 28 | *limit, |
| 29 | *offset, |
| 30 | *distinct, |
| 31 | window_functions, |
| 32 | temporal, |
| 33 | ), |
| 34 | SqlPlan::PointGet { |
| 35 | collection, |
| 36 | alias, |
| 37 | engine, |
| 38 | key_column, |
| 39 | key_value, |
| 40 | } => visitor.point_get(collection, alias.as_deref(), *engine, key_column, key_value), |
| 41 | SqlPlan::DocumentIndexLookup { |
| 42 | collection, |
| 43 | alias, |
| 44 | engine, |
| 45 | field, |
| 46 | value, |
| 47 | filters, |
| 48 | projection, |
| 49 | sort_keys, |
| 50 | limit, |
| 51 | offset, |
| 52 | distinct, |
| 53 | window_functions, |
| 54 | case_insensitive, |
| 55 | temporal, |
| 56 | } => visitor.document_index_lookup( |
| 57 | collection, |
| 58 | alias.as_deref(), |
| 59 | *engine, |
| 60 | field, |
| 61 | value, |
| 62 | filters, |
| 63 | projection, |
nothing calls this directly
no test coverage detected