pub fn from_api_str(api_str: &str) -> Self {
        use self::OptimizerRule::*;
        match api_str {
            OPTIMIZER_RULE_ALL => All,
            OPTIMIZER_RULE_MOVE_CALCULATIONS_UP => MoveCalculationsUp,
            OPTIMIZER_RULE_MOVE_FILTERS_UP => MoveFiltersUp,
            OPTIMIZER_RULE_SORT_IN_VALUES => SortInValues,
            OPTIMIZER_RULE_REMOVE_UNNECESSARY_FILTERS => RemoveUnnecessaryFilters,
            OPTIMIZER_RULE_REMOVE_REDUNDANT_CALCULATIONS => RemoveRedundantCalculations,
            OPTIMIZER_RULE_REMOVE_UNNECESSARY_CALCULATIONS => RemoveUnnecessaryCalculations,
            OPTIMIZER_RULE_REMOVE_REDUNDANT_SORTS => RemoveRedundantSorts,
            OPTIMIZER_RULE_INTERCHANGE_ADJACENT_ENUMERATIONS => InterchangeAdjacentEnumerations,
            OPTIMIZER_RULE_REMOVE_COLLECT_VARIABLES => RemoveCollectVariables,
            OPTIMIZER_RULE_PROPAGATE_CONSTANT_ATTRIBUTES => PropagateConstantAttributes,
            OPTIMIZER_RULE_REPLACE_OR_WITH_IN => ReplaceOrWithIn,
            OPTIMIZER_RULE_REMOVE_REDUNDANT_OR => RemoveRedundantOr,
            OPTIMIZER_RULE_USE_INDEXES => UseIndexes,
            OPTIMIZER_RULE_REMOVE_FILTER_COVERED_BY_INDEX => RemoveFilterCoveredByIndex,
            OPTIMIZER_RULE_REMOVE_FILTER_COVERED_BY_TRAVERSAL => RemoveFilterCoveredByTraversal,
            OPTIMIZER_RULE_USE_INDEX_FOR_SORT => UseIndexForSort,
            OPTIMIZER_RULE_MOVE_CALCULATIONS_DOWN => MoveCalculationsDown,
            OPTIMIZER_RULE_PATCH_UPDATE_STATEMENTS => PatchUpdateStatements,
            OPTIMIZER_RULE_OPTIMIZE_TRAVERSALS => OptimizeTraversals,
            OPTIMIZER_RULE_INLINE_SUBQUERIES => InlineSubQueries,
            OPTIMIZER_RULE_GEO_INDEX_OPTIMIZER => GeoIndexOptimizer,
            OPTIMIZER_RULE_REMOVE_SORT_RAND => RemoveSortRand,
            OPTIMIZER_RULE_REDUCE_EXTRACTION_TO_PROJECTION => ReduceExtractionToProjection,
            #[cfg(feature = "cluster")]
            OPTIMIZER_RULE_DISTRIBUTE_IN_CLUSTER => DistributeInCluster,
            #[cfg(feature = "cluster")]
            OPTIMIZER_RULE_SCATTER_IN_CLUSTER => ScatterInCluster,
            #[cfg(feature = "cluster")]
            OPTIMIZER_RULE_DISTRIBUTE_FILTERCALC_TO_CLUSTER => DistributeFilterCalcToCluster,
            #[cfg(feature = "cluster")]
            OPTIMIZER_RULE_DISTRIBUTE_SORT_TO_CLUSTER => DistributeSortToCluster,
            #[cfg(feature = "cluster")]
            OPTIMIZER_RULE_REMOVE_UNNECESSARY_REMOTE_SCATTER => RemoveUnnecessaryRemoteScatter,
            #[cfg(feature = "cluster")]
            OPTIMIZER_RULE_UNDISTRIBUTE_REMOVE_AFTER_ENUM_COLL => UnDistributeRemoveAfterEnumColl,
            rule => Custom(rule.to_owned()),
        }
    }
/// Constructs an optimizer rule from the string slice as used in the
/// *ArangoDB* API.
Constructs an optimizer rule from the string slice as used in the
ArangoDB* API.
Constructs an optimizer rule from the string slice as used in the ArangoDB * API .
pub fn from_api_str(api_str: &str) -> Self {
        use self::OptimizerRule::*;
        match api_str {
            OPTIMIZER_RULE_ALL => All,
            OPTIMIZER_RULE_MOVE_CALCULATIONS_UP => MoveCalculationsUp,
            OPTIMIZER_RULE_MOVE_FILTERS_UP => MoveFiltersUp,
            OPTIMIZER_RULE_SORT_IN_VALUES => SortInValues,
            OPTIMIZER_RULE_REMOVE_UNNECESSARY_FILTERS => RemoveUnnecessaryFilters,
            OPTIMIZER_RULE_REMOVE_REDUNDANT_CALCULATIONS => RemoveRedundantCalculations,
            OPTIMIZER_RULE_REMOVE_UNNECESSARY_CALCULATIONS => RemoveUnnecessaryCalculations,
            OPTIMIZER_RULE_REMOVE_REDUNDANT_SORTS => RemoveRedundantSorts,
            OPTIMIZER_RULE_INTERCHANGE_ADJACENT_ENUMERATIONS => InterchangeAdjacentEnumerations,
            OPTIMIZER_RULE_REMOVE_COLLECT_VARIABLES => RemoveCollectVariables,
            OPTIMIZER_RULE_PROPAGATE_CONSTANT_ATTRIBUTES => PropagateConstantAttributes,
            OPTIMIZER_RULE_REPLACE_OR_WITH_IN => ReplaceOrWithIn,
            OPTIMIZER_RULE_REMOVE_REDUNDANT_OR => RemoveRedundantOr,
            OPTIMIZER_RULE_USE_INDEXES => UseIndexes,
            OPTIMIZER_RULE_REMOVE_FILTER_COVERED_BY_INDEX => RemoveFilterCoveredByIndex,
            OPTIMIZER_RULE_REMOVE_FILTER_COVERED_BY_TRAVERSAL => RemoveFilterCoveredByTraversal,
            OPTIMIZER_RULE_USE_INDEX_FOR_SORT => UseIndexForSort,
            OPTIMIZER_RULE_MOVE_CALCULATIONS_DOWN => MoveCalculationsDown,
            OPTIMIZER_RULE_PATCH_UPDATE_STATEMENTS => PatchUpdateStatements,
            OPTIMIZER_RULE_OPTIMIZE_TRAVERSALS => OptimizeTraversals,
            OPTIMIZER_RULE_INLINE_SUBQUERIES => InlineSubQueries,
            OPTIMIZER_RULE_GEO_INDEX_OPTIMIZER => GeoIndexOptimizer,
            OPTIMIZER_RULE_REMOVE_SORT_RAND => RemoveSortRand,
            OPTIMIZER_RULE_REDUCE_EXTRACTION_TO_PROJECTION => ReduceExtractionToProjection,
            #[cfg(feature = "cluster")]
            OPTIMIZER_RULE_DISTRIBUTE_IN_CLUSTER => DistributeInCluster,
            #[cfg(feature = "cluster")]
            OPTIMIZER_RULE_SCATTER_IN_CLUSTER => ScatterInCluster,
            #[cfg(feature = "cluster")]
            OPTIMIZER_RULE_DISTRIBUTE_FILTERCALC_TO_CLUSTER => DistributeFilterCalcToCluster,
            #[cfg(feature = "cluster")]
            OPTIMIZER_RULE_DISTRIBUTE_SORT_TO_CLUSTER => DistributeSortToCluster,
            #[cfg(feature = "cluster")]
            OPTIMIZER_RULE_REMOVE_UNNECESSARY_REMOTE_SCATTER => RemoveUnnecessaryRemoteScatter,
            #[cfg(feature = "cluster")]
            OPTIMIZER_RULE_UNDISTRIBUTE_REMOVE_AFTER_ENUM_COLL => UnDistributeRemoveAfterEnumColl,
            rule => Custom(rule.to_owned()),
        }
    }
pub fn from_api_str ( api_str : & str ) -> Self { use self :: OptimizerRule :: * ; match api_str { OPTIMIZER_RULE_ALL => All , OPTIMIZER_RULE_MOVE_CALCULATIONS_UP => MoveCalculationsUp , OPTIMIZER_RULE_MOVE_FILTERS_UP => MoveFiltersUp , OPTIMIZER_RULE_SORT_IN_VALUES => SortInValues , OPTIMIZER_RULE_REMOVE_UNNECESSARY_FILTERS => RemoveUnnecessaryFilters , OPTIMIZER_RULE_REMOVE_REDUNDANT_CALCULATIONS => RemoveRedundantCalculations , OPTIMIZER_RULE_REMOVE_UNNECESSARY_CALCULATIONS => RemoveUnnecessaryCalculations , OPTIMIZER_RULE_REMOVE_REDUNDANT_SORTS => RemoveRedundantSorts , OPTIMIZER_RULE_INTERCHANGE_ADJACENT_ENUMERATIONS => InterchangeAdjacentEnumerations , OPTIMIZER_RULE_REMOVE_COLLECT_VARIABLES => RemoveCollectVariables , OPTIMIZER_RULE_PROPAGATE_CONSTANT_ATTRIBUTES => PropagateConstantAttributes , OPTIMIZER_RULE_REPLACE_OR_WITH_IN => ReplaceOrWithIn , OPTIMIZER_RULE_REMOVE_REDUNDANT_OR => RemoveRedundantOr , OPTIMIZER_RULE_USE_INDEXES => UseIndexes , OPTIMIZER_RULE_REMOVE_FILTER_COVERED_BY_INDEX => RemoveFilterCoveredByIndex , OPTIMIZER_RULE_REMOVE_FILTER_COVERED_BY_TRAVERSAL => RemoveFilterCoveredByTraversal , OPTIMIZER_RULE_USE_INDEX_FOR_SORT => UseIndexForSort , OPTIMIZER_RULE_MOVE_CALCULATIONS_DOWN => MoveCalculationsDown , OPTIMIZER_RULE_PATCH_UPDATE_STATEMENTS => PatchUpdateStatements , OPTIMIZER_RULE_OPTIMIZE_TRAVERSALS => OptimizeTraversals , OPTIMIZER_RULE_INLINE_SUBQUERIES => InlineSubQueries , OPTIMIZER_RULE_GEO_INDEX_OPTIMIZER => GeoIndexOptimizer , OPTIMIZER_RULE_REMOVE_SORT_RAND => RemoveSortRand , OPTIMIZER_RULE_REDUCE_EXTRACTION_TO_PROJECTION => ReduceExtractionToProjection , # [ cfg ( feature " " ) ] OPTIMIZER_RULE_DISTRIBUTE_IN_CLUSTER => DistributeInCluster , # [ cfg ( feature " " ) ] OPTIMIZER_RULE_SCATTER_IN_CLUSTER => ScatterInCluster , # [ cfg ( feature " " ) ] OPTIMIZER_RULE_DISTRIBUTE_FILTERCALC_TO_CLUSTER => DistributeFilterCalcToCluster , # [ cfg ( feature " " ) ] OPTIMIZER_RULE_DISTRIBUTE_SORT_TO_CLUSTER => DistributeSortToCluster , # [ cfg ( feature " " ) ] OPTIMIZER_RULE_REMOVE_UNNECESSARY_REMOTE_SCATTER => RemoveUnnecessaryRemoteScatter , # [ cfg ( feature " " ) ] OPTIMIZER_RULE_UNDISTRIBUTE_REMOVE_AFTER_ENUM_COLL => UnDistributeRemoveAfterEnumColl , rule => Custom ( rule . to_owned ( ) ) , } }
Constructs an optimizer rule from the string slice as used in the
ArangoDB* API.
Constructs an optimizer rule from the string slice as used in the ArangoDB * API .
api_str
&str
api_str
&str