AuditSqlDao.sql.stg

17 lines | 410 B Blame History Raw Download
group AuditSqlDao;

fields(prefix) ::= <<
    <prefix>table_name,
    <prefix>record_id,
    <prefix>change_type,
    <prefix>change_date,
    <prefix>changed_by,
    <prefix>reason_code,
    <prefix>comments,
    <prefix>user_token
>>

insertAuditFromTransaction() ::= <<
    INSERT INTO audit_log(<fields()>)
    VALUES(:tableName, :recordId, :changeType, :createdDate, :userName, NULL, NULL, :userToken);
>>