[][src]Struct postgres_parser::nodes::ColumnDef

pub struct ColumnDef {
    pub colname: Option<String>,
    pub typeName: Option<Box<TypeName>>,
    pub inhcount: i32,
    pub is_local: bool,
    pub is_not_null: bool,
    pub is_from_type: bool,
    pub storage: char,
    pub raw_default: Option<Box<Node>>,
    pub cooked_default: Option<Box<Node>>,
    pub identity: char,
    pub identitySequence: Option<Box<RangeVar>>,
    pub generated: char,
    pub collClause: Option<Box<CollateClause>>,
    pub collOid: Oid,
    pub constraints: Option<Vec<Node>>,
    pub fdwoptions: Option<Vec<Node>>,
    pub location: i32,
}

ColumnDef column definition (used in various creates)

If the column has a default value, we may have the value expression in either "raw" form (an untransformed parse tree) or "cooked" form (a postparseanalysis, executable expression tree), depending on how this ColumnDef node was created (by parsing, or by inheritance from an existing relation). We should never have both in the same node!

Similarly, we may have a COLLATE specification in either raw form (represented as a CollateClause with arg==NULL) or cooked form (the collation's OID).

The constraints list may contain a CONSTR_DEFAULT item in a raw parsetree produced by gram.y, but transformCreateStmt will remove the item and set raw_default instead. CONSTR_DEFAULT items should not appear in any subsequent processing.

Fields

colname: Option<String>typeName: Option<Box<TypeName>>inhcount: i32is_local: boolis_not_null: boolis_from_type: boolstorage: charraw_default: Option<Box<Node>>cooked_default: Option<Box<Node>>identity: charidentitySequence: Option<Box<RangeVar>>generated: charcollClause: Option<Box<CollateClause>>collOid: Oidconstraints: Option<Vec<Node>>fdwoptions: Option<Vec<Node>>location: i32

Trait Implementations

impl Debug for ColumnDef[src]

impl<'de> Deserialize<'de> for ColumnDef[src]

impl Eq for ColumnDef[src]

impl PartialEq<ColumnDef> for ColumnDef[src]

impl Serialize for ColumnDef[src]

impl StructuralEq for ColumnDef[src]

impl StructuralPartialEq for ColumnDef[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.