[][src]Struct sql_audit::AuditRecord

pub struct AuditRecord {
    pub id: i32,
    pub table_name: String,
    pub pk: i32,
    pub operation: String,
    pub db_user: String,
    pub app_user: Option<String>,
    pub request_id: Option<String>,
    pub old_val: Option<Value>,
    pub new_val: Option<Value>,
}

A structure representing a single row of the audit table.

Fields

id: i32

Surrogate key

table_name: String

Name of table that this row is from

pk: i32

The pk column of the row (matches OLD for UPDATE/DELETE and NEW for INSERT)

operation: String

One of "INSERT", "UPDATE", "DELETE"

db_user: String

The user in the database that made the change

app_user: Option<String>

Semantically the user of the application that made the change. Realistically whatever was set using set_local_app_user during the transaction.

request_id: Option<String>

Semantically the unique identifier of the request that made the change. Realistically whatever was set using set_local_request_id during the transaction.

old_val: Option<Value>

The JSON representation of the row before the operation took place. Only populated for UPDATE and DELETE.

new_val: Option<Value>

The JSON representation of the row after the operation took place. Only populated for INSERT and UPDATE.

Trait Implementations

impl Debug for AuditRecord[src]

impl Eq for AuditRecord[src]

impl<'a, R: Row> FromRow<'a, R> for AuditRecord where
    &'a str: ColumnIndex<R>,
    i32: Decode<'a, R::Database>,
    i32: Type<R::Database>,
    String: Decode<'a, R::Database>,
    String: Type<R::Database>,
    i32: Decode<'a, R::Database>,
    i32: Type<R::Database>,
    String: Decode<'a, R::Database>,
    String: Type<R::Database>,
    String: Decode<'a, R::Database>,
    String: Type<R::Database>,
    Option<String>: Decode<'a, R::Database>,
    Option<String>: Type<R::Database>,
    Option<String>: Decode<'a, R::Database>,
    Option<String>: Type<R::Database>,
    Option<Value>: Decode<'a, R::Database>,
    Option<Value>: Type<R::Database>,
    Option<Value>: Decode<'a, R::Database>,
    Option<Value>: Type<R::Database>, 
[src]

impl PartialEq<AuditRecord> for AuditRecord[src]

impl StructuralEq for AuditRecord[src]

impl StructuralPartialEq for AuditRecord[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> Conv for T

impl<T> Conv for T

impl<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]

impl<T> FmtForward for T

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<D> OwoColorize for D

impl<T> Pipe for T where
    T: ?Sized

impl<T> Pipe for T

impl<T> PipeAsRef for T

impl<T> PipeBorrow for T

impl<T> PipeDeref for T

impl<T> PipeRef for T

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> Tap for T

impl<T> Tap for T

impl<T, U> TapAsRef<U> for T where
    U: ?Sized

impl<T, U> TapBorrow<U> for T where
    U: ?Sized

impl<T> TapDeref for T

impl<T> TryConv for T

impl<T> TryConv for T

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.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,