dbo.QBM_TUDialogConfigParm
Database TriggerSQL_TRIGGERSandbox DB
Interpretation
- Database trigger. Treat parent table and enqueue/object-layer calls as the main relation points.
- DBQueue relation detected. Follow the task procedure and referenced-by list for async processing.
Relations
- Single DBQueue insert -> QBM-K-CommonConfigParm / QBM_ZConfigParmCheck at line 5
- Single DBQueue insert -> QBM-K-PrepropGenerateFunction / QBM_ZPrepropGenerateFunction at line 5
- bulk DBQueue insert -> QBM-K-CommonReCalculate / QBM_ZRecalculate at line 5
- Single DBQueue insert -> QBM-K-PrepropGenerateFunction / QBM_ZPrepropGenerateFunction at line 7
- bulk DBQueue insert -> QBM-K-CommonReCalculate / QBM_ZRecalculate at line 7
- bulk DBQueue insert -> QBM-K-CommonReCalculate / QBM_ZRecalculate at line 10
- References QBM_PDBQueueInsert_Single
- References QBM_PDBQueueInsert_Bulk
- Trigger parent table: DialogConfigParm
Typed Edges
- queues DBQueue task QBM_ZConfigParmCheck at line 5 Single DBQueue insert -> QBM-K-CommonConfigParm / QBM_ZConfigParmCheck at line 5
- queues DBQueue task QBM_ZPrepropGenerateFunction at line 5 Single DBQueue insert -> QBM-K-PrepropGenerateFunction / QBM_ZPrepropGenerateFunction at line 5
- queues DBQueue task QBM_ZRecalculate at line 5 bulk DBQueue insert -> QBM-K-CommonReCalculate / QBM_ZRecalculate at line 5
- queues DBQueue task QBM_ZPrepropGenerateFunction at line 7 Single DBQueue insert -> QBM-K-PrepropGenerateFunction / QBM_ZPrepropGenerateFunction at line 7
- queues DBQueue task QBM_ZRecalculate at line 7 bulk DBQueue insert -> QBM-K-CommonReCalculate / QBM_ZRecalculate at line 7
- queues DBQueue task QBM_ZRecalculate at line 10 bulk DBQueue insert -> QBM-K-CommonReCalculate / QBM_ZRecalculate at line 10
- trigger on table DialogConfigParm Trigger parent table: DialogConfigParm
- references source dbo.QBM_FGISessionContext source text reference
- references source dbo.QBM_PDBQueueInsert_Bulk source text reference
- references source dbo.QBM_PDBQueueInsert_Single source text reference
- references source dbo.QBM_PHistoryColumnSetDefault source text reference
- references source dbo.QBM_PSessionErrorAdd source text reference
Complete Source
1CREATE trigger QBM_TUDialogConfigParm2 ON DialogConfigParm FOR3UPDATE NOT FOR Replication4AS5BEGIN6 BEGIN TRY7 IF EXISTS(8 SELECT TOP 1 19 FROM inserted)10 GOTO start11 IF EXISTS(12 SELECT TOP 1 113 FROM deleted)14 GOTO start15 RETURN start:16 DECLARE @GenProcID varchar(38)17 SELECT @GenProcID = dbo.QBM_FGISessionContext('')18 IF EXISTS(19 SELECT TOP 1 120 FROM dialogconfigparm p21 JOIN deleted d22 ON p.uid_configparm = d.uid_configparm23 WHERE24 p.fullpath = 'Common\ProcessState\PropertyLog\AllDefaultPropertiesForModel' AND isnull(d.IsEnabledResulting,25 0) = 0 AND isnull(p.IsEnabledResulting, 0) = 1)26 BEGIN27 EXEC QBM_PHistoryColumnSetDefault28 END29 IF30 UPDATE(Enabled)31 BEGIN32 EXEC QBM_PDBQueueInsert_Single 'QBM-K-CommonConfigParm',33 '',34 '',35 @GenProcID36 END37 IF38 UPDATE(Value) OR39 UPDATE(IsEnabledResulting) OR40 UPDATE(IsPreprocessorCondition)41 BEGIN42 IF EXISTS(43 SELECT TOP 1 144 FROM DialogConfigParm i45 JOIN deleted d46 ON d.UID_ConfigParm = i.UID_ConfigParm47 WHERE48 i.IsPreprocessorCondition <> d.IsPreprocessorCondition OR((i.IsEnabledResulting <> d.IsEnabledResulting OR ISNULL(d.value,49 '') <> ISNULL(i.value, '')) AND i.IsPreprocessorCondition = 1))50 BEGIN51 EXEC QBM_PDBQueueInsert_Single 'QBM-K-PrepropGenerateFunction',52 '',53 '',54 @GenProcID55 END56 DECLARE @DBQueueElements_01 QBM_YDBQueueRaw57 INSERT INTO @DBQueueElements_01(Object,58 SubObject,59 GenProcID)60 SELECT61 DISTINCT ht.UID_Task,62 NULL,63 @GenProcID64 FROM DialogConfigParm i65 JOIN deleted d66 ON d.UID_ConfigParm = i.UID_ConfigParm67 JOIN QBMConfigParmHasTask ht68 ON i.UID_ConfigParm = ht.UID_ConfigParm69 WHERE70 i.IsEnabledResulting <> d.IsEnabledResulting OR ISNULL(d.value,71 '') <> ISNULL(i.value,72 '')73 EXEC QBM_PDBQueueInsert_bulk 'QBM-K-CommonReCalculate',74 @DBQueueElements_0175 END76 END TRY77 BEGIN CATCH78 EXEC QBM_PSessionErrorAdd DEFAULT79 RAISERROR('',80 18,81 1)82 WITH NOWAIT83 END CATCH84END
Open raw exported source
1 create trigger QBM_TUDialogConfigParm on DialogConfigParm for Update not for Replication as begin BEGIN TRY if exists (select top 1 1 from2 inserted) goto start if exists (select top 1 1 from deleted) goto start return start: declare @GenProcID varchar(38) select @GenProcID = dbo.QBM_FGISessionContext3('') if exists ( select top 1 1 from dialogconfigparm p join deleted d on p.uid_configparm = d.uid_configparm where p.fullpath = 'Common\ProcessState\PropertyLog\AllDefaultPropertiesForModel'4 and isnull(d.IsEnabledResulting,0) = 0 and isnull(p.IsEnabledResulting,0) = 1 ) begin exec QBM_PHistoryColumnSetDefault end if update(Enabled) begin 5exec QBM_PDBQueueInsert_Single 'QBM-K-CommonConfigParm', '', '', @GenProcID end if update(Value) or update(IsEnabledResulting) or update(IsPreprocessorCondition6) begin if exists (select top 1 1 from DialogConfigParm i join deleted d on d.UID_ConfigParm = i.UID_ConfigParm where i.IsPreprocessorCondition <> d.IsPreprocessorCondition7 or ( (i.IsEnabledResulting <> d.IsEnabledResulting or ISNULL(d.value, '') <> ISNULL(i.value, '') ) and i.IsPreprocessorCondition = 1 ) ) begin exec QBM_PDBQueueInsert_Single8 'QBM-K-PrepropGenerateFunction', '', '', @GenProcID end declare @DBQueueElements_01 QBM_YDBQueueRaw insert into @DBQueueElements_01 (Object, SubObject9, GenProcID) select distinct ht.UID_Task, null, @GenProcID from DialogConfigParm i join deleted d on d.UID_ConfigParm = i.UID_ConfigParm join QBMConfigParmHasTask10 ht on i.UID_ConfigParm = ht.UID_ConfigParm where i.IsEnabledResulting <> d.IsEnabledResulting or ISNULL(d.value, '') <> ISNULL(i.value, '') exec QBM_PDBQueueInsert_bulk11 'QBM-K-CommonReCalculate', @DBQueueElements_01 end END TRY BEGIN CATCH exec QBM_PSessionErrorAdd default RAISERROR ('', 18, 1) WITH NOWAIT END CATCH12 end 13