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:
Panagiotis Karatakis 2023-01-10 10:36:02 +02:00 committed by GitHub
parent ed7be8a29b
commit c83c674612
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -401,6 +401,11 @@ impl ColumnDef {
pub fn get_column_type(&self) -> &ColumnType {
&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 {