Skip to main content

graphos_engine/query/
mod.rs

1//! Query processing pipeline.
2//!
3//! This module provides the complete query execution pipeline:
4//!
5//! - **Translators**: Convert query languages (GQL, Cypher, SPARQL, etc.) to logical plans
6//! - **Binder**: Semantic validation and variable resolution
7//! - **Optimizer**: Plan optimization (filter pushdown, join reorder, etc.)
8//! - **Planner**: Convert logical plans to physical operators
9//! - **Executor**: Execute physical operators and collect results
10//! - **Processor**: Unified interface orchestrating the full pipeline
11//! - **Cache**: LRU cache for parsed and optimized query plans
12
13pub mod binder;
14pub mod cache;
15pub mod executor;
16pub mod optimizer;
17pub mod plan;
18pub mod planner;
19pub mod processor;
20
21#[cfg(feature = "rdf")]
22pub mod planner_rdf;
23
24#[cfg(feature = "gql")]
25pub mod gql_translator;
26
27#[cfg(feature = "cypher")]
28pub mod cypher_translator;
29
30#[cfg(feature = "sparql")]
31pub mod sparql_translator;
32
33#[cfg(feature = "gremlin")]
34pub mod gremlin_translator;
35
36#[cfg(feature = "graphql")]
37pub mod graphql_translator;
38
39#[cfg(all(feature = "graphql", feature = "rdf"))]
40pub mod graphql_rdf_translator;
41
42// Core exports
43pub use cache::{CacheKey, CacheStats, CachingQueryProcessor, QueryCache};
44pub use executor::Executor;
45pub use optimizer::{CardinalityEstimator, Optimizer};
46pub use plan::{LogicalExpression, LogicalOperator, LogicalPlan};
47pub use planner::{
48    PhysicalPlan, Planner, convert_aggregate_function, convert_binary_op,
49    convert_filter_expression, convert_unary_op,
50};
51pub use processor::{QueryLanguage, QueryParams, QueryProcessor};
52
53#[cfg(feature = "rdf")]
54pub use planner_rdf::RdfPlanner;
55
56// Translator exports
57#[cfg(feature = "gql")]
58pub use gql_translator::translate as translate_gql;
59
60#[cfg(feature = "cypher")]
61pub use cypher_translator::translate as translate_cypher;
62
63#[cfg(feature = "sparql")]
64pub use sparql_translator::translate as translate_sparql;
65
66#[cfg(feature = "gremlin")]
67pub use gremlin_translator::translate as translate_gremlin;
68
69#[cfg(feature = "graphql")]
70pub use graphql_translator::translate as translate_graphql;
71
72#[cfg(all(feature = "graphql", feature = "rdf"))]
73pub use graphql_rdf_translator::translate as translate_graphql_rdf;