[][src]Struct postgres_parser::sys::Const

#[repr(C)]pub struct Const {
    pub xpr: Expr,
    pub consttype: Oid,
    pub consttypmod: int32,
    pub constcollid: Oid,
    pub constlen: c_int,
    pub constvalue: Datum,
    pub constisnull: bool,
    pub constbyval: bool,
    pub location: c_int,
}

Const

Note: for varlena data types, we make a rule that a Const node's value must be in nonextended form (4byte header, no compression or external references). This ensures that the Const node is selfcontained and makes it more likely that equal() will see logically identical values as equal.

Fields

xpr: Exprconsttype: Oidconsttypmod: int32

pg_type OID of the constant's datatype

constcollid: Oid

typmod value, if any

constlen: c_int

OID of collation, or InvalidOid if none

constvalue: Datum

typlen of the constant's datatype

constisnull: bool

the constant's value

constbyval: bool

whether the constant is null (if true, constvalue is undefined)

location: c_int

whether this datatype is passed by value. If true, then all the information is stored in the Datum. If false, then the Datum contains a pointer to the information.

Trait Implementations

impl Debug for Const[src]

impl Default for Const[src]

impl Eq for Const[src]

impl Hash for Const[src]

impl PartialEq<Const> for Const[src]

impl StructuralEq for Const[src]

impl StructuralPartialEq for Const[src]

Auto Trait Implementations

impl RefUnwindSafe for Const

impl Send for Const

impl Sync for Const

impl Unpin for Const

impl UnwindSafe for Const

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> 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.