pub struct CreateDomainStatement {
pub name: String,
pub base_type: ColumnTypeName,
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). User-defined enum / domain
bases are deferred to Phase 1.5b.
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
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for CreateDomainStatement
impl Debug for CreateDomainStatement
Source§impl Display for CreateDomainStatement
impl Display for CreateDomainStatement
Source§impl PartialEq for CreateDomainStatement
impl PartialEq for CreateDomainStatement
Source§fn eq(&self, other: &CreateDomainStatement) -> bool
fn eq(&self, other: &CreateDomainStatement) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for CreateDomainStatement
Auto Trait Implementations§
impl Freeze for CreateDomainStatement
impl RefUnwindSafe for CreateDomainStatement
impl Send for CreateDomainStatement
impl Sync for CreateDomainStatement
impl Unpin for CreateDomainStatement
impl UnsafeUnpin for CreateDomainStatement
impl UnwindSafe for CreateDomainStatement
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more