Skip to content

Commit

Permalink
Add unique getter to ColumnDef (#2401)
Browse files Browse the repository at this point in the history
* Add unique getter to ColumnDef

* Update src/entity/column.rs

---------

Co-authored-by: Chris Tsang <[email protected]>
  • Loading branch information
elichai and tyt2y3 authored Dec 23, 2024
1 parent e7af52b commit 8a256ce
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 @@ -403,6 +403,11 @@ impl ColumnDef {
pub fn is_null(&self) -> bool {
self.null
}

/// Returns true if the column is unique
pub fn is_unique(&self) -> bool {
self.unique
}
}

struct Text;
Expand Down

0 comments on commit 8a256ce

Please sign in to comment.