1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
//! Cypher Query Language Support for AletheiaDB
//!
//! This module provides Cypher query language support with bi-temporal extensions,
//! enabling developers to query the graph database using the industry-standard
//! Cypher syntax while maintaining full temporal capabilities.
//!
//! # Feature Flag
//!
//! This module is only available when the `cypher` feature is enabled:
//!
//! ```toml
//! [dependencies]
//! aletheiadb = { version = "0.1", features = ["cypher"] }
//! ```
//!
//! # Architecture
//!
//! ```text
//! Cypher String -> [Lexer] -> Tokens -> [Parser] -> Cypher AST -> [Planner] -> Query IR -> Results
//! ```
//!
//! The pipeline is built from scratch (no external parser dependency) to support
//! AletheiaDB's temporal and vector extensions natively.
//!
//! # Quick Start
//!
//! ```rust
//! use aletheiadb::cypher::CypherError;
//!
//! // Errors carry position information for diagnostics
//! let err = CypherError::ParseError {
//! position: 42,
//! message: "expected RETURN clause".to_string(),
//! };
//! assert_eq!(err.to_string(), "Cypher parse error at position 42: expected RETURN clause");
//! ```
//!
//! # Planned Syntax
//!
//! ## Phase 1: Core Cypher
//! - `MATCH (n:Label)-[:REL]->(m)` -- graph pattern matching
//! - `WHERE`, `RETURN`, `ORDER BY`, `LIMIT`, `SKIP`
//!
//! ## Phase 2: Temporal Extensions
//! - `AT TIME timestamp` -- point-in-time queries
//! - `BETWEEN t1 AND t2` -- time-range queries
//!
//! ## Phase 3: Vector Extensions
//! - `SIMILAR TO $embedding LIMIT k` -- k-NN search
//! - `RANK BY SIMILARITY` -- hybrid graph + vector queries
pub use *;
pub use ;
pub use CypherError;
pub use ;
pub use CypherParser;