Skip to main content

grafeo_engine/query/
mod.rs

1//! The complete query processing pipeline.
2//!
3//! Your query goes through several stages before results come back:
4//!
5//! 1. **Translator** - Parses GQL/Cypher/SPARQL into a logical plan
6//! 2. **Binder** - Validates that variables and properties exist
7//! 3. **Optimizer** - Pushes filters down, reorders joins for speed
8//! 4. **Planner** - Converts the logical plan to physical operators
9//! 5. **Executor** - Actually runs the operators and streams results
10//!
11//! Most users don't interact with these directly - just call
12//! [`Session::execute()`](crate::Session::execute). But if you're building
13//! custom query processing, [`QueryProcessor`] is the unified interface.
14
15pub mod binder;
16pub mod cache;
17pub mod executor;
18pub mod optimizer;
19pub mod plan;
20pub mod planner;
21pub mod processor;
22pub mod profile;
23pub mod translators;
24
25// Core exports
26pub use cache::{CacheKey, CacheStats, CachingQueryProcessor, QueryCache};
27pub use executor::Executor;
28pub use optimizer::{CardinalityEstimator, Optimizer};
29pub use plan::{LogicalExpression, LogicalOperator, LogicalPlan};
30pub use planner::{
31    PhysicalPlan, Planner, convert_aggregate_function, convert_binary_op,
32    convert_filter_expression, convert_unary_op,
33};
34pub use processor::{QueryLanguage, QueryParams, QueryProcessor};
35
36#[cfg(feature = "rdf")]
37pub use planner::rdf::RdfPlanner;
38
39// Translator exports
40#[cfg(feature = "gql")]
41pub use translators::gql::translate as translate_gql;
42
43#[cfg(feature = "cypher")]
44pub use translators::cypher::translate as translate_cypher;
45
46#[cfg(feature = "sparql")]
47pub use translators::sparql::translate as translate_sparql;
48
49#[cfg(feature = "gremlin")]
50pub use translators::gremlin::translate as translate_gremlin;
51
52#[cfg(feature = "graphql")]
53pub use translators::graphql::translate as translate_graphql;
54
55#[cfg(feature = "sql-pgq")]
56pub use translators::sql_pgq::translate as translate_sql_pgq;
57
58#[cfg(all(feature = "graphql", feature = "rdf"))]
59pub use translators::graphql_rdf::translate as translate_graphql_rdf;