[][src]Struct postgres_parser::sys::CaseTestExpr

#[repr(C)]pub struct CaseTestExpr {
    pub xpr: Expr,
    pub typeId: Oid,
    pub typeMod: int32,
    pub collation: Oid,
}

Placeholder node for the test value to be processed by a CASE expression. This is effectively like a Param, but can be implemented more simply since we need only one replacement value at a time.

We also abuse this node type for some other purposes, including:

  • Placeholder for the current array element value in ArrayCoerceExpr; see build_coercion_expression().
  • Nested FieldStore/SubscriptingRef assignment expressions in INSERT/UPDATE; see transformAssignmentIndirection().

The uses in CaseExpr and ArrayCoerceExpr are safe only to the extent that there is not any other CaseExpr or ArrayCoerceExpr between the value source node and its child CaseTestExpr(s). This is true in the parse analysis output, but the planner's functioninlining logic has to be careful not to break it.

The nestedassignmentexpression case is safe because the only node types that can be above such CaseTestExprs are FieldStore and SubscriptingRef.

Fields

xpr: ExprtypeId: OidtypeMod: int32

type for substituted value

collation: Oid

typemod for substituted value

Trait Implementations

impl Debug for CaseTestExpr[src]

impl Default for CaseTestExpr[src]

impl Eq for CaseTestExpr[src]

impl Hash for CaseTestExpr[src]

impl PartialEq<CaseTestExpr> for CaseTestExpr[src]

impl StructuralEq for CaseTestExpr[src]

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