Skip to main content

CrudEntry

Struct CrudEntry 

Source
pub struct CrudEntry {
    pub client_id: i64,
    pub transaction_id: i64,
    pub update_type: UpdateType,
    pub table: String,
    pub id: String,
    pub metadata: Option<String>,
    pub data: Option<Map<String, Value>>,
    pub previous_values: Option<Map<String, Value>>,
}
Expand description

A single client-side change.

Fields§

§client_id: i64

Auto-incrementing client-side id.

Reset whenever the database is re-created.

§transaction_id: i64

Auto-incrementing transaction id.

Reset whenever the database is re-created.

§update_type: UpdateType

Type of change.

§table: String

Table that contained the change.

§id: String

ID of the changed row.

§metadata: Option<String>

An optional metadata string attached to this entry at the time the write was made.

For tables where [Table::track_metadata] is enabled, a hidden _metadata column is added to this table that can be used during updates to attach a hint to the update thas is preserved here.

§data: Option<Map<String, Value>>

Data associated with the change.

For PUT, this contains all non-null columns of the row.

For PATCH, this contains the columns that changed.

For DELETE, this is null.

§previous_values: Option<Map<String, Value>>

Old values before an update.

This is only tracked for tables for which this has been enabled by setting the [Table::track_previous_values].

Auto Trait Implementations§

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.