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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
//! Syna Query — SQL-like (EQL) and MongoDB-like (EMQ) query layer for SynaDB.
//!
//! # Overview
//!
//! The `query` module provides a declarative query interface on top of the
//! core SynaDB engine. It supports two syntactic flavours:
//!
//! - **EQL** — SQL-like syntax (`SELECT * FROM "sensor/*" WHERE ...`)
//! - **EMQ** — MongoDB-like JSON documents (`{ filter: {...}, sort: {...} }`)
//!
//! Both parse into a shared [`ast::QueryAst`], then go through a planner,
//! optimizer, and executor to produce a [`QueryResult`].
//!
//! # Status
//!
//! **Experimental, under active development.** This is the scaffolding for
//! Task 1 of the `syna-query` spec — AST types and error taxonomy only.
//! The parser, planner, optimizer, and executor ship in later tasks.
// Future submodules (added as tasks land)
// pub mod parser;
// pub mod emq_parser;
// pub mod planner;
// pub mod optimizer;
// pub mod executor;
// pub mod aggregation;
// pub mod timeseries;
// pub mod temporal_join;
// pub mod anomaly;
// pub mod pattern;
// pub mod predict;
// pub mod correlation;
// pub mod streaming;
// pub mod explain;
// pub mod macros;
// pub mod lineage;
// pub mod prepared;
// pub mod ffi;
// pub mod vector_query;
// pub mod freshness_query;
// Re-exports for downstream consumers (Task 1.1)
pub use QueryAst;
pub use ;
/// A single row in a query result.
/// Metadata attached to every [`QueryResult`].
/// Final result of executing a query.