mod access;
mod agg;
mod binding;
mod clause_kind;
mod expr_check;
mod expr_text;
mod inline;
mod names;
mod namespaces;
mod order;
mod pattern;
mod plan;
mod query_type;
mod resolve;
mod rewrite;
mod stats;
mod use_target;
mod validate;
pub use crate::clause_kind::{clause_keyword, clause_mutates_store, clause_projects_rows};
pub use crate::inline::plan_is_bounded_work;
pub use crate::names::{conditional_declared_columns, query_with_persistent_imports};
pub use crate::namespaces::{
admin_command_heads_statement, composed_admin_disallowed_clause, is_database_admin_command,
is_show_databases_with_next, is_write, plan_calls_write_procedure,
unsupported_system_clause_names,
};
pub use crate::order::{
apply_degree, apply_hop_bound, apply_path_degree, best_seek, endpoint_estimate,
seed_on_rel_start, seed_rows, walk_cost, where_conjuncts_of, Bound, Estimate, Hop, SeekPick,
};
pub use crate::order::{crossover_scan_rows, range_seek_gated};
pub use crate::plan::{
plan, plan_any_clause, plan_contains_dynamic_operands, plan_contains_in_transactions,
plan_has_bound_float_integer_site, plan_output_names, plan_output_names_expect,
plan_parameter_names, plan_with_stats, plan_with_tokens, query_any_clause, walk_plan_clauses,
walk_plan_parts, walk_query_parts, LogicalPlan,
};
pub use crate::query_type::{query_type, QueryType};
pub use crate::stats::{ContainsCount, NoPatternStats, PatternStats};
pub use crate::validate::check_union_joiners;
#[cfg(test)]
pub(crate) fn plan_of(cypher: &str) -> LogicalPlan {
let ast = relate_front::parse_cypher(cypher).unwrap();
plan(ast, &mut |_| false).unwrap()
}
#[cfg(test)]
pub(crate) fn rejection(src: &str) -> String {
match relate_front::parse_and_lower(src) {
Ok(q) => plan(q, &mut |_| false).unwrap_err().to_string(),
Err(e) => e.to_string(),
}
}
#[cfg(test)]
mod tests;