[][src]Struct postgres_parser::sys::SubscriptingRef

#[repr(C)]pub struct SubscriptingRef {
    pub xpr: Expr,
    pub refcontainertype: Oid,
    pub refelemtype: Oid,
    pub reftypmod: int32,
    pub refcollid: Oid,
    pub refupperindexpr: *mut List,
    pub reflowerindexpr: *mut List,
    pub refexpr: *mut Expr,
    pub refassgnexpr: *mut Expr,
}

SubscriptingRef: describes a subscripting operation over a container (array, etc).

A SubscriptingRef can describe fetching a single element from a container, fetching a part of container (e.g. array slice), storing a single element into a container, or storing a slice. The "store" cases work with an initial container value and a source value that is inserted into the appropriate part of the container; the result of the operation is an entire new modified container value.

If reflowerindexpr = NIL, then we are fetching or storing a single container element at the subscripts given by refupperindexpr. Otherwise we are fetching or storing a container slice, that is a rectangular subcontainer with lower and upper bounds given by the index expressions. reflowerindexpr must be the same length as refupperindexpr when it is not NIL.

In the slice case, individual expressions in the subscript lists can be NULL, meaning "substitute the array's current lower or upper bound".

Note: the result datatype is the element type when fetching a single element; but it is the array type when doing subarray fetch or either type of store.

Note: for the cases where a container is returned, if refexpr yields a R/W expanded container, then the implementation is allowed to modify that object inplace and return the same object.)

Fields

xpr: Exprrefcontainertype: Oidrefelemtype: Oid

type of the container proper

reftypmod: int32

type of the container elements

refcollid: Oid

typmod of the container (and elements too)

refupperindexpr: *mut List

OID of collation, or InvalidOid if none

reflowerindexpr: *mut List

expressions that evaluate to upper container indexes

refexpr: *mut Expr

expressions that evaluate to lower container indexes, or NIL for single container element

refassgnexpr: *mut Expr

the expression that evaluates to a container value

Trait Implementations

impl Debug for SubscriptingRef[src]

impl Default for SubscriptingRef[src]

impl Eq for SubscriptingRef[src]

impl Hash for SubscriptingRef[src]

impl PartialEq<SubscriptingRef> for SubscriptingRef[src]

impl StructuralEq for SubscriptingRef[src]

impl StructuralPartialEq for SubscriptingRef[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> 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.