ormlette/ir/ir
Types
pub type ColumnConstraint {
PrimaryKey
Nullable
Unique
ForeignKey(
references_table: TableIR,
references_column: String,
on_delete: Option(String),
on_update: Option(String),
)
}
Constructors
-
PrimaryKey
-
Nullable
-
Unique
-
ForeignKey( references_table: TableIR, references_column: String, on_delete: Option(String), on_update: Option(String), )
pub type ColumnIR {
ColumnIR(
name: String,
type_: c.ColumnType,
constraints: List(ColumnConstraint),
default: Option(dynamic.Dynamic),
)
}
Constructors
-
ColumnIR( name: String, type_: c.ColumnType, constraints: List(ColumnConstraint), default: Option(dynamic.Dynamic), )
Functions
pub fn inverse_ir(table_ir: TableIR) -> String
pub fn to_sql_drop(table_ir: TableIR) -> String