toasty-sql 0.5.0

SQL serialization layer for Toasty database drivers
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
use super::Ident;
use toasty_core::stmt::Expr;

/// A `CHECK` constraint, usable at both column and table level.
///
/// Mirrors sqlparser's `CheckConstraint` struct.
#[derive(Debug, Clone)]
pub struct CheckConstraint {
    /// Optional constraint name (`CONSTRAINT <name> CHECK ...`).
    pub name: Option<Ident>,
    /// The boolean expression the CHECK constraint enforces.
    pub expr: Box<Expr>,
}