Audit logging
Audit logging is completely performed inside the database engine using triggers.
Example
type Account extending internal::APAAA, internal::HasDefaultTimestamp, ident::Contact {
/**
* Object type definition...
**/
trigger audit_insert_log after insert for each do (
insert log::auth_log::AccountLog {
new := <json>(select __new__) {*},
}
);
trigger audit_update_log after update for each do (
insert log::auth_log::AccountLog {
new := <json>(select __new__) {*},
old := <json>(select __old__) {*}
}
);
trigger audit_delete_log after delete for each do (
insert log::auth_log::AccountLog {
old := <json>(select __old__) {*}
}
);
}