Skip to content

Commit

Permalink
feat: introduce LTree column type
Browse files Browse the repository at this point in the history
  • Loading branch information
EstebanBorai committed Sep 9, 2023
1 parent b7e5413 commit bc5e40e
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/table/column.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ pub enum ColumnType {
Cidr,
Inet,
MacAddr,
LTree,
}

impl PartialEq for ColumnType {
Expand Down Expand Up @@ -580,6 +581,13 @@ impl ColumnDef {
self
}

/// Set column type as `ltree`
/// This is only supported on Postgres.
pub fn ltree(&mut self) -> &mut Self {
self.types = Some(ColumnType::LTree);
self
}

/// Set constraints as SimpleExpr
pub fn check<T>(&mut self, value: T) -> &mut Self
where
Expand Down

0 comments on commit bc5e40e

Please sign in to comment.