audit_trigger

Function audit_trigger 

Source
pub fn audit_trigger(
    table: &str,
    audit_table: &str,
    events: impl IntoIterator<Item = TriggerEvent>,
) -> TriggerBuilder
Expand description

Create an audit log trigger that records changes to a table.

§PostgreSQL Example

let trigger = patterns::audit_trigger("users", "audit_log", &["UPDATE", "DELETE"]);