Add ColumnDef::get_column_default getter (#2387)

This commit is contained in:
Billy Chan 2024-10-08 11:32:02 +08:00 committed by GitHub
parent 51d8125d96
commit 8be5c2648b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -389,6 +389,11 @@ impl ColumnDef {
&self.col_type &self.col_type
} }
/// Get [Option<SimpleExpr>] as reference
pub fn get_column_default(&self) -> Option<&SimpleExpr> {
self.default.as_ref()
}
/// Returns true if the column is nullable /// Returns true if the column is nullable
pub fn is_null(&self) -> bool { pub fn is_null(&self) -> bool {
self.null self.null