44 lines
1.6 KiB
Plaintext
44 lines
1.6 KiB
Plaintext
CREATE OR REPLACE TRIGGER "EFT_NOM".cg$BUR_PROFILE_OPTIONS
|
|
|
|
BEFORE UPDATE ON PROFILE_OPTIONS FOR EACH ROW
|
|
|
|
|
|
DECLARE
|
|
cg$rec cg$PROFILE_OPTIONS.cg$row_type;
|
|
cg$ind cg$PROFILE_OPTIONS.cg$ind_type;
|
|
cg$old_rec cg$PROFILE_OPTIONS.cg$row_type;
|
|
BEGIN
|
|
-- Application_logic Pre-Before-Update-row <<Start>>
|
|
-- Application_logic Pre-Before-Update-row << End >>
|
|
|
|
-- Load cg$rec/cg$ind values from new
|
|
|
|
cg$rec.SYOP_ID := :new.SYOP_ID;
|
|
cg$ind.SYOP_ID := (:new.SYOP_ID IS NULL AND :old.SYOP_ID IS NOT NULL )
|
|
OR (:new.SYOP_ID IS NOT NULL AND :old.SYOP_ID IS NULL)
|
|
OR NOT(:new.SYOP_ID = :old.SYOP_ID) ;
|
|
cg$PROFILE_OPTIONS.cg$table(cg$PROFILE_OPTIONS.idx).SYOP_ID := :old.SYOP_ID;
|
|
cg$rec.SYPR_ID := :new.SYPR_ID;
|
|
cg$ind.SYPR_ID := (:new.SYPR_ID IS NULL AND :old.SYPR_ID IS NOT NULL )
|
|
OR (:new.SYPR_ID IS NOT NULL AND :old.SYPR_ID IS NULL)
|
|
OR NOT(:new.SYPR_ID = :old.SYPR_ID) ;
|
|
cg$PROFILE_OPTIONS.cg$table(cg$PROFILE_OPTIONS.idx).SYPR_ID := :old.SYPR_ID;
|
|
|
|
|
|
cg$PROFILE_OPTIONS.idx := cg$PROFILE_OPTIONS.idx + 1;
|
|
|
|
if not (cg$PROFILE_OPTIONS.called_from_package) then
|
|
cg$PROFILE_OPTIONS.validate_arc(cg$rec);
|
|
cg$PROFILE_OPTIONS.validate_domain(cg$rec, cg$ind);
|
|
cg$PROFILE_OPTIONS.validate_domain_cascade_update(cg$old_rec);
|
|
|
|
cg$PROFILE_OPTIONS.upd(cg$rec, cg$ind, FALSE);
|
|
cg$PROFILE_OPTIONS.called_from_package := FALSE;
|
|
end if;
|
|
|
|
-- Application_logic Post-Before-Update-row <<Start>>
|
|
-- Application_logic Post-Before-Update-row << End >>
|
|
END;
|
|
/
|
|
|