pub struct CreateDomainStatement {
pub name: String,
pub base_type: ColumnTypeName,
pub base_domain: Option<String>,
pub default: Option<Expr>,
pub not_null: bool,
pub checks: Vec<Expr>,
}Expand description
v7.17.0 Phase 1.5 — CREATE DOMAIN AST.
Fields§
§name: String§base_type: ColumnTypeNameBase type for the domain (one of the built-in
ColumnTypeName variants).
base_domain: Option<String>v7.39 (round 259) — CREATE DOMAIN child AS parent … where
parent is itself a DOMAIN. The parser already captured the
unknown type name; it just was not carried here, so the parent’s
CHECK constraints were invisible and a value violating them was
silently accepted. base_type still holds the ultimate scalar
type, which is what the storage tier stores.
default: Option<Expr>Optional DEFAULT <expr>. Resolved at engine-side
CREATE TABLE time when a column is bound to this domain.
not_null: boolNOT NULL from the domain definition. Engine ORs this
with the column-level nullability so the strictest of the
two wins (i.e. the column is non-nullable if either side
says so).
checks: Vec<Expr>Zero-or-more CHECK (expr) predicates. Each one is
enforced as part of the column’s CHECK list at INSERT /
UPDATE time, with VALUE substituted for the column’s
current cell value.
Trait Implementations§
Source§impl Clone for CreateDomainStatement
impl Clone for CreateDomainStatement
Source§fn clone(&self) -> CreateDomainStatement
fn clone(&self) -> CreateDomainStatement
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more