CustomFieldSqlDao.sql.stg

30 lines | 929 B Blame History Raw Download
group CustomFieldSqlDao;

batchInsertFromTransaction() ::= <<
    INSERT INTO custom_fields(id, object_id, object_type, field_name, field_value, created_by, created_date)
    VALUES (:id, :objectId, :objectType, :fieldName, :fieldValue, :userName, :date);
>>

batchUpdateFromTransaction() ::= <<
    UPDATE custom_fields
    SET field_value = :fieldValue, updated_by = :userName, created_date = :date
    WHERE object_id = :objectId AND object_type = :objectType AND field_name = :fieldName;
>>

batchDeleteFromTransaction() ::= <<
    DELETE FROM custom_fields
    WHERE object_id = :objectId AND object_type = :objectType AND field_name = :fieldName;
>>

load() ::= <<
    SELECT id, object_id, object_type, field_name, field_value, created_by, created_date, updated_by, updated_date
    FROM custom_fields
    WHERE object_id = :objectId AND object_type = :objectType;
>>

test() ::= <<
    SELECT 1 FROM custom_fields;
>>
;