Skip to main content

CaseInit

Struct CaseInit 

Source
pub struct CaseInit<'a, V: SQLParam> { /* private fields */ }
Expand description

A CASE builder before its first branch; created by case.

The result type is set by the first when.

Implementations§

Source§

impl<'a, V: SQLParam + 'a> CaseInit<'a, V>

Source

pub fn when<C, R>( self, condition: C, result: R, ) -> CaseBuilder<'a, V, R::SQLType, R::Nullable, <C::Aggregate as AggregateKind>::Or<R::Aggregate>, (ScopeOnly<C::Sources>, R::Sources)>
where C: Expr<'a, V>, R: Expr<'a, V>, C::SQLType: BooleanLike,

Adds the first WHEN condition THEN result branch.

condition must be boolean. result sets the type of the whole CASE.

Auto Trait Implementations§

§

impl<'a, V> Freeze for CaseInit<'a, V>
where SQL<'a, V>: Freeze, PhantomData<V>: Freeze,

§

impl<'a, V> RefUnwindSafe for CaseInit<'a, V>

§

impl<'a, V> Send for CaseInit<'a, V>
where SQL<'a, V>: Send, PhantomData<V>: Send,

§

impl<'a, V> Sync for CaseInit<'a, V>
where SQL<'a, V>: Sync, PhantomData<V>: Sync,

§

impl<'a, V> Unpin for CaseInit<'a, V>
where SQL<'a, V>: Unpin, PhantomData<V>: Unpin,

§

impl<'a, V> UnsafeUnpin for CaseInit<'a, V>

§

impl<'a, V> UnwindSafe for CaseInit<'a, V>
where SQL<'a, V>: UnwindSafe, PhantomData<V>: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<Joined, From> JoinKey<From, JoinReverse> for Joined
where From: Joinable<Joined> + ?Sized,

Source§

fn pairs() -> &'static [(&'static str, &'static str)]

(joined_column, from_column) pairs the ON condition matches, in key order, read through Self::pair.
Source§

fn pair(pair: &(&'static str, &'static str)) -> (&'static str, &'static str)

The (joined_column, from_column) names of pair.
Source§

impl<List> ListIncludes<Nil, ()> for List

Source§

impl<Mk> MarkerAggValidFor<()> for Mk

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> TypeEq<T> for T