pub mod code_generator;
pub mod compiler;
pub mod filter_compiler;
pub mod pattern_matcher;
pub mod type_mapper;
pub use code_generator::CodeGenerator;
pub use compiler::HyperQLCompiler;
pub use filter_compiler::FilterCompiler;
pub use pattern_matcher::{
AggregateFunction, FilterCondition, FilterOperator, FilterValue, LiteralValue, OrderByClause,
PatternMatcher, QueryPattern, TraverseInfo,
};
pub use type_mapper::TypeMapper;
pub type CompilerResult<T> = Result<T, CompilerError>;
#[derive(Debug, thiserror::Error)]
pub enum CompilerError {
#[error("Failed to parse HyperQL query: {0}")]
ParseError(String),
#[error("Unknown table '{table}'. Available tables: {available}")]
UnknownTable { table: String, available: String },
#[error("Unknown schema '{schema}'")]
UnknownSchema { schema: String },
#[error("Type mismatch: expected {expected}, got {actual}")]
TypeMismatch { expected: String, actual: String },
#[error("Unsupported query pattern: {0}")]
UnsupportedPattern(String),
#[error("Invalid filter expression: {0}")]
InvalidFilter(String),
#[error("Code generation error: {0}")]
CodeGenError(String),
}