CustomFieldAuditSqlDao.sql.stg

27 lines | 698 B Blame History Raw Download
group CustomFieldAuditSqlDao;

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

batchInsertFromTransaction() ::= <<
    INSERT INTO audit_log(<fields()>)
    VALUES('custom_field', :id, 'INSERT', :createdDate, :userName, NULL, NULL);
>>

batchDeleteFromTransaction() ::= <<
    INSERT INTO audit_log(<fields()>)
    VALUES('custom_field', :id, 'DELETE', :updatedDate, :userName, NULL, NULL);
>>

batchUpdateFromTransaction() ::= <<
    INSERT INTO audit_log(<fields()>)
    VALUES('custom_field', :id, 'UPDATE', :updatedDate, :userName, NULL, NULL);
>>
;