feophantlib/engine/objects/
planned_statement.rs

1use std::sync::Arc;
2
3use super::{types::SqlTypeDefinition, SqlTuple, Table};
4
5pub struct PlannedStatement {
6    pub common: PlannedCommon,
7    pub plan: Arc<Plan>,
8}
9
10pub struct PlannedCommon {}
11
12pub enum Plan {
13    CartesianJoin(CartesianJoin),
14    FullTableScan(FullTableScan),
15    ModifyTable(ModifyTablePlan),
16    StaticData(Arc<Vec<SqlTuple>>),
17}
18
19pub struct CartesianJoin {
20    ///Output columns from this plan
21    //pub columns: Vec<Attribute>,
22    ///Columns defining the output of the left plan
23    //pub left_cols: Vec<Attribute>,
24    ///The left plan; Left is just arbitrary
25    pub left: Arc<Plan>,
26    ///Columns defining the output of the right plan
27    //pub right_cols: Vec<Attribute>,
28    ///The right plan; Right is just arbitrary
29    pub right: Arc<Plan>,
30}
31
32pub struct FullTableScan {
33    pub src_table: Arc<Table>,
34    pub target_type: Arc<SqlTypeDefinition>,
35}
36
37pub struct ModifyTablePlan {
38    pub table: Arc<Table>,
39    pub source: Arc<Plan>,
40}