use super::types::SqlTypeDefinition;
use super::SqlTuple;
use super::Table;
use std::sync::Arc;
#[derive(Clone, Debug)]
pub struct QueryTree {
pub command_type: CommandType,
pub targets: Arc<SqlTypeDefinition>,
pub range_tables: Vec<RangeRelation>,
pub joins: Vec<(JoinType, RangeRelation, RangeRelation)>,
}
#[derive(Clone, Copy, Debug)]
pub enum CommandType {
Select,
Insert,
Update,
Delete,
Utility,
}
#[derive(Clone, Debug)]
pub enum RangeRelation {
Table(RangeRelationTable),
AnonymousTable(Arc<Vec<SqlTuple>>), }
#[derive(Clone, Debug)]
pub struct RangeRelationTable {
pub table: Arc<Table>,
pub alias: Option<String>,
}
#[derive(Clone, Debug)]
pub enum WhereEntry {}
#[derive(Clone, Copy, Debug)]
pub enum JoinType {
Inner,
OuterLeft,
OuterRight,
OuterFull,
}