Skip to main content

nodedb_sql/types/
mod.rs

1// SPDX-License-Identifier: Apache-2.0
2
3//! SqlPlan intermediate representation types.
4//!
5//! These types represent the output of the nodedb-sql planner. Both Origin
6//! (server) and Lite (embedded) map these to their own execution model.
7
8pub mod collection;
9pub mod filter;
10pub mod plan;
11pub mod query;
12
13pub use collection::{CollectionInfo, ColumnInfo, IndexSpec, IndexState};
14pub use filter::{CompareOp, Filter, FilterExpr};
15pub use plan::{
16    AlterArrayPlan, ArrayAggPlan, ArrayElementwisePlan, ArrayProjectPlan, ArraySlicePlan,
17    CreateArrayPlan, CreateIndexPlan, CtePlan, DeleteArrayPlan, DocumentIndexLookupPlan,
18    DropIndexPlan, HybridSearchPlan, HybridSearchTriplePlan, InsertArrayPlan, InsertPlan,
19    KvInsertPlan, LateralLoopPlan, LateralTopKPlan, MergePlan, RangeScanPlan, RecursiveScanPlan,
20    RecursiveValuePlan, TextScoreColumn, TextSearchPlan, TextSearchShape, TimeseriesIngestPlan,
21    TimeseriesScanPlan, UpsertPlan, VectorPrimaryDeletePlan, VectorPrimaryInsertPlan,
22    VectorPrimaryTruncatePlan, VectorPrimaryUpdatePlan,
23};
24pub use plan::{
25    ArrayPrefilter, DistanceMetric, KvInsertIntent, MergeClauseKind, MergePlanAction,
26    MergePlanClause, PlanCacheEligibility, SqlPlan, VectorAnnOptions, VectorPrimaryInsertIntent,
27    VectorPrimaryRow, VectorQuantization, WriteRoute,
28};
29pub use query::{
30    AggOutputSlot, AggregateExpr, EngineType, JoinType, Projection, SortKey, SpatialPredicate,
31    WindowSpec,
32};
33
34// ── SQL value / expression / operator types ──
35// Re-exported so downstream `use crate::types::*` continues to resolve these
36// symbols without change.
37pub use crate::types_expr::{BinaryOp, SqlDataType, SqlExpr, SqlPayloadAtom, SqlValue, UnaryOp};
38
39// ── Catalog trait ──
40// Re-exported here so downstream modules that `use crate::types::*`
41// keep resolving `SqlCatalog` without changing their imports.
42pub use crate::catalog::{ArrayCatalogView, SqlCatalog, SqlCatalogError};
43pub use crate::fts_types::FtsQuery;