Skip to main content

ChangesetOp

Enum ChangesetOp 

Source
pub enum ChangesetOp<'a, T, S, B> {
    Insert {
        table: &'a T,
        values: &'a [Value<S, B>],
        indirect: bool,
    },
    Update {
        table: &'a T,
        values: &'a [ChangesetUpdatePair<S, B>],
        indirect: bool,
    },
    Delete {
        table: &'a T,
        old_values: &'a [Value<S, B>],
        indirect: bool,
    },
}
Expand description

View over one operation in a changeset.

Variants§

§

Insert

INSERT. Carries every column’s value in column order.

Fields

§table: &'a T

Table this row belongs to.

§values: &'a [Value<S, B>]

Full row values, one per column.

§indirect: bool

SQLite session-extension indirect flag.

§

Update

UPDATE. Carries (old, new) pairs per column. None in either slot means “undefined” (the column was not part of the diff).

Fields

§table: &'a T

Table this row belongs to.

§values: &'a [ChangesetUpdatePair<S, B>]

(old, new) pairs, one per column.

§indirect: bool

SQLite session-extension indirect flag.

§

Delete

DELETE. Carries the full old-row values in column order.

Fields

§table: &'a T

Table this row belongs to.

§old_values: &'a [Value<S, B>]

Full old-row values, one per column.

§indirect: bool

SQLite session-extension indirect flag.

Implementations§

Source§

impl<'a, T, S, B> ChangesetOp<'a, T, S, B>

Source

pub fn table(&self) -> &'a T

Returns the schema of the table this operation applies to.

Source

pub fn indirect(&self) -> bool

Returns the SQLite session-extension indirect flag.

Trait Implementations§

Source§

impl<'a, T: Debug, S: Debug, B: Debug> Debug for ChangesetOp<'a, T, S, B>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<'a, T, S, B> Freeze for ChangesetOp<'a, T, S, B>

§

impl<'a, T, S, B> RefUnwindSafe for ChangesetOp<'a, T, S, B>

§

impl<'a, T, S, B> Send for ChangesetOp<'a, T, S, B>
where T: Sync, S: Sync, B: Sync,

§

impl<'a, T, S, B> Sync for ChangesetOp<'a, T, S, B>
where T: Sync, S: Sync, B: Sync,

§

impl<'a, T, S, B> Unpin for ChangesetOp<'a, T, S, B>

§

impl<'a, T, S, B> UnsafeUnpin for ChangesetOp<'a, T, S, B>

§

impl<'a, T, S, B> UnwindSafe for ChangesetOp<'a, T, S, B>

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<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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.