Add is_null getter for ColumnDef struct (#1381)
* Add is_null getter for ColumnDef struct * Update src/entity/column.rs * Update src/entity/column.rs Co-authored-by: Chris Tsang <chris.2y3@outlook.com>
This commit is contained in:
parent
ed7be8a29b
commit
c83c674612
@ -401,6 +401,11 @@ impl ColumnDef {
|
|||||||
pub fn get_column_type(&self) -> &ColumnType {
|
pub fn get_column_type(&self) -> &ColumnType {
|
||||||
&self.col_type
|
&self.col_type
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Returns true if the column is nullable
|
||||||
|
pub fn is_null(&self) -> bool {
|
||||||
|
self.null
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl From<ColumnType> for sea_query::ColumnType {
|
impl From<ColumnType> for sea_query::ColumnType {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user