[][src]Enum mech_core::Constraint

pub enum Constraint {
    NewTable {
        id: TableId,
        rows: u64,
        columns: u64,
    },
    TableColumn {
        table: u64,
        column_ix: u64,
        column_alias: u64,
    },
    Reference {
        table: TableId,
        destination: u64,
    },
    Scan {
        table: TableId,
        indices: Vec<(Option<Parameter>, Option<Parameter>)>,
        output: TableId,
    },
    ChangeScan {
        tables: Vec<(TableId, Vec<(Option<Parameter>, Option<Parameter>)>)>,
    },
    Identifier {
        id: u64,
        text: String,
    },
    Function {
        fnstring: String,
        parameters: Vec<(String, TableId, Vec<(Option<Parameter>, Option<Parameter>)>)>,
        output: Vec<TableId>,
    },
    Constant {
        table: TableId,
        row: Index,
        column: Index,
        value: Quantity,
        unit: Option<String>,
    },
    String {
        table: TableId,
        row: Index,
        column: Index,
        value: String,
    },
    CopyTable {
        from_table: u64,
        to_table: u64,
    },
    AliasTable {
        table: TableId,
        alias: u64,
    },
    Insert {
        from: (TableId, Vec<(Option<Parameter>, Option<Parameter>)>),
        to: (TableId, Vec<(Option<Parameter>, Option<Parameter>)>),
    },
    Append {
        from_table: TableId,
        to_table: TableId,
    },
    Empty {
        table: TableId,
        row: Index,
        column: Index,
    },
    Null,
}

Variants

NewTable

Fields of NewTable

id: TableIdrows: u64columns: u64
TableColumn

Fields of TableColumn

table: u64column_ix: u64column_alias: u64
Reference

Fields of Reference

table: TableIddestination: u64
Scan

Fields of Scan

table: TableIdindices: Vec<(Option<Parameter>, Option<Parameter>)>output: TableId
ChangeScan

Fields of ChangeScan

tables: Vec<(TableId, Vec<(Option<Parameter>, Option<Parameter>)>)>
Identifier

Fields of Identifier

id: u64text: String
Function

Fields of Function

fnstring: Stringparameters: Vec<(String, TableId, Vec<(Option<Parameter>, Option<Parameter>)>)>output: Vec<TableId>
Constant

Fields of Constant

table: TableIdrow: Indexcolumn: Indexvalue: Quantityunit: Option<String>
String

Fields of String

table: TableIdrow: Indexcolumn: Indexvalue: String
CopyTable

Fields of CopyTable

from_table: u64to_table: u64
AliasTable

Fields of AliasTable

table: TableIdalias: u64
Insert
Append

Fields of Append

from_table: TableIdto_table: TableId
Empty

Fields of Empty

table: TableIdrow: Indexcolumn: Index
Null

Trait Implementations

impl Clone for Constraint[src]

impl Debug for Constraint[src]

impl<'de> Deserialize<'de> for Constraint[src]

impl PartialEq<Constraint> for Constraint[src]

impl Serialize for Constraint[src]

impl StructuralPartialEq for Constraint[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.