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:
parent
e7af52bf0e
commit
8a256cec6a
@ -403,6 +403,11 @@ impl ColumnDef {
|
|||||||
pub fn is_null(&self) -> bool {
|
pub fn is_null(&self) -> bool {
|
||||||
self.null
|
self.null
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Returns true if the column is unique
|
||||||
|
pub fn is_unique(&self) -> bool {
|
||||||
|
self.unique
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
struct Text;
|
struct Text;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user