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;
22
23#[cfg(feature = "rdf")]
24pub mod planner_rdf;
25
26#[cfg(feature = "gql")]
27pub mod gql_translator;
28
29#[cfg(feature = "cypher")]
30pub mod cypher_translator;
31
32#[cfg(feature = "sparql")]
33pub mod sparql_translator;
34
35#[cfg(feature = "gremlin")]
36pub mod gremlin_translator;
37
38#[cfg(feature = "graphql")]
39pub mod graphql_translator;
40
41#[cfg(all(feature = "graphql", feature = "rdf"))]
42pub mod graphql_rdf_translator;
43
44// Core exports
45pub use cache::{CacheKey, CacheStats, CachingQueryProcessor, QueryCache};
46pub use executor::Executor;
47pub use optimizer::{CardinalityEstimator, Optimizer};
48pub use plan::{LogicalExpression, LogicalOperator, LogicalPlan};
49pub use planner::{
50    PhysicalPlan, Planner, convert_aggregate_function, convert_binary_op,
51    convert_filter_expression, convert_unary_op,
52};
53pub use processor::{QueryLanguage, QueryParams, QueryProcessor};
54
55#[cfg(feature = "rdf")]
56pub use planner_rdf::RdfPlanner;
57
58// Translator exports
59#[cfg(feature = "gql")]
60pub use gql_translator::translate as translate_gql;
61
62#[cfg(feature = "cypher")]
63pub use cypher_translator::translate as translate_cypher;
64
65#[cfg(feature = "sparql")]
66pub use sparql_translator::translate as translate_sparql;
67
68#[cfg(feature = "gremlin")]
69pub use gremlin_translator::translate as translate_gremlin;
70
71#[cfg(feature = "graphql")]
72pub use graphql_translator::translate as translate_graphql;
73
74#[cfg(all(feature = "graphql", feature = "rdf"))]
75pub use graphql_rdf_translator::translate as translate_graphql_rdf;