Skip to content

Commit 8a256ce

Browse files
elichaityt2y3
andauthored
Add unique getter to ColumnDef (#2401)
* Add unique getter to ColumnDef * Update src/entity/column.rs --------- Co-authored-by: Chris Tsang <[email protected]>
1 parent e7af52b commit 8a256ce

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/entity/column.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -403,6 +403,11 @@ impl ColumnDef {
403403
pub fn is_null(&self) -> bool {
404404
self.null
405405
}
406+
407+
/// Returns true if the column is unique
408+
pub fn is_unique(&self) -> bool {
409+
self.unique
410+
}
406411
}
407412

408413
struct Text;

0 commit comments

Comments
 (0)