Add unique getter to ColumnDef (#2401)

* Add unique getter to ColumnDef

* Update src/entity/column.rs

---------

Co-authored-by: Chris Tsang <chris.2y3@outlook.com>
This commit is contained in:
Elichai Turkel 2024-12-24 01:28:45 +02:00 committed by GitHub
parent e7af52bf0e
commit 8a256cec6a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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;