Sign in

    oboard/morm/table does not have a README file

    Column

    pub(all) struct Column {
    name : String
    column_type : ColumnType
    size : Int
    nullable : Bool
    default_value : String?
    auto_increment : Bool
    primary_key : Bool
    unique : Bool
    comment : String
    charset : String?
    collation : String?
    engine_options : FixedArray[ColumnEngineOption]
    }

    impl Compare for Column
    impl Eq for Column
    impl Hash for Column
    impl Show for Column
    impl ToJson for Column

    ColumnEngineOption

    pub(all) struct ColumnEngineOption {
    key : String
    value : String
    }

    ColumnType

    pub(all) enum ColumnType {
    TinyInt
    SmallInt
    MediumInt
    Int
    BigInt
    Float
    Double
    Decimal(Int, Int)
    Char(Int)
    VarChar(Int)
    Text
    MediumText
    LongText
    Binary(Int)
    VarBinary(Int)
    Blob
    MediumBlob
    LongBlob
    Date
    Time
    DateTime
    Timestamp
    Year
    Json
    JsonB
    Boolean
    }

    impl Eq for ColumnType
    impl Hash for ColumnType
    impl Show for ColumnType

    ForeignKey

    pub(all) struct ForeignKey {
    name : String
    column : String
    referenced_table : String
    referenced_column : String
    on_delete : String
    on_update : String
    }

    impl Eq for ForeignKey
    impl Hash for ForeignKey
    impl Show for ForeignKey

    Index

    pub(all) struct Index {
    name : String
    index_type : IndexType
    columns : FixedArray[String]
    comment : String
    }

    impl Compare for Index
    impl Eq for Index
    impl Hash for Index
    impl Show for Index
    impl ToJson for Index

    IndexType

    pub(all) enum IndexType {
    Primary
    Unique
    Index
    FullText
    Spatial
    }

    impl Eq for IndexType
    impl Hash for IndexType
    impl Show for IndexType
    impl ToJson for IndexType

    Table

    pub(all) struct Table {
    name : String
    schema : String?
    catalog : String?
    columns : FixedArray[Column]
    indexes : FixedArray[Index]
    foreign_keys : FixedArray[ForeignKey]
    temporary : Bool
    if_not_exists : Bool
    engine : String?
    charset : String?
    collation : String?
    tablespace : String?
    comment : String
    auto_increment : Int?
    engine_options : FixedArray[TableEngineOption]
    }

    impl Compare for Table
    impl Eq for Table
    impl Hash for Table
    impl Show for Table
    impl ToJson for Table

    TableEngineOption

    pub(all) struct TableEngineOption {
    key : String
    value : String
    }

    Source Files