Skip to main content

toasty_sql/stmt/
check.rs

1use super::Ident;
2use toasty_core::stmt::Expr;
3
4/// A `CHECK` constraint, usable at both column and table level.
5///
6/// Mirrors sqlparser's `CheckConstraint` struct.
7#[derive(Debug, Clone)]
8pub struct CheckConstraint {
9    /// Optional constraint name (`CONSTRAINT <name> CHECK ...`).
10    pub name: Option<Ident>,
11    /// The boolean expression the CHECK constraint enforces.
12    pub expr: Box<Expr>,
13}