Skip to content

Commit

Permalink
Add ColumnDef::get_column_default getter (SeaQL#2387)
Browse files Browse the repository at this point in the history
  • Loading branch information
billy1624 authored Oct 8, 2024
1 parent 51d8125 commit 8be5c26
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/entity/column.rs
Original file line number Diff line number Diff line change
Expand Up @@ -389,6 +389,11 @@ impl ColumnDef {
&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
pub fn is_null(&self) -> bool {
self.null
Expand Down

0 comments on commit 8be5c26

Please sign in to comment.