dbo.QBM_TIDialogUserInGroup
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
- Bulk DBQueue insert -> QBM-K-DialogUserInGroup / QBM_ZDialogUserInGroup at line 5
- References QBM_PDBQueueInsert_Bulk
- Trigger parent table: DialogUserInGroup
Typed Edges
- queues DBQueue task QBM_ZDialogUserInGroup at line 5 Bulk DBQueue insert -> QBM-K-DialogUserInGroup / QBM_ZDialogUserInGroup at line 5
- trigger on table DialogUserInGroup Trigger parent table: DialogUserInGroup
- references source dbo.QBM_FGISessionContext source text reference
- references source dbo.QBM_PDBQueueInsert_Bulk source text reference
- references source dbo.QBM_PDialogUserInGroupCorrect source text reference
- references source dbo.QBM_PSessionErrorAdd source text reference
- references source dbo.QBM_TIDialogUser source text reference
References
- dbo.QBM_FGISessionContext
- dbo.QBM_PDBQueueInsert_Bulk
- dbo.QBM_PDialogUserInGroupCorrect
- dbo.QBM_PSessionErrorAdd
- dbo.QBM_TIDialogUser
Referenced By
- No direct source references extracted.
Complete Source
1CREATE trigger QBM_TIDialogUserInGroup2 ON DialogUserInGroup FOR3INSERT NOT FOR Replication4AS5BEGIN6 DECLARE @ProcName nvarchar(64) = object_name(@@procid)7 DECLARE @XUser nvarchar(64)8 DECLARE @DebugSwitch int = 09 BEGIN TRY10 IF EXISTS(11 SELECT TOP 1 112 FROM inserted)13 GOTO start14 RETURN start:15 DECLARE @GenProcID varchar(38)16 SELECT @GenProcID = dbo.QBM_FGISessionContext('')17 IF @Debugswitch > 018 BEGIN19 print 'entry : ' + @ProcName20 END21 IF @XUser = 'QBM_PDialogUserInGroupCorrect'22 BEGIN23 IF @Debugswitch > 024 BEGIN25 print 'recursion exit : ' + @ProcName26 END27 GOTO endlabel28 END29 DECLARE @DBQueueElements_01 QBM_YDBQueueRaw30 INSERT INTO @DBQueueElements_01(object,31 subobject,32 genprocid)33 SELECT34 x.uid,35 NULL,36 @GenProcID37 FROM(38 SELECT39 DISTINCT UID_DialogUser AS uid40 FROM inserted) AS x41 EXEC QBM_PDBQueueInsert_Bulk 'QBM-K-DialogUserInGroup',42 @DBQueueElements_0143 IF @Debugswitch > 044 BEGIN45 print 'ready : ' + @ProcName46 END47 END TRY48 BEGIN CATCH49 EXEC QBM_PSessionErrorAdd DEFAULT50 RAISERROR('',51 18,52 1)53 WITH NOWAIT54 END CATCH55 IF @Debugswitch > 056 BEGIN57 print 'exit : ' + @ProcName58 END59 endLabel:60 RETURN61END
Open raw exported source
1 create trigger QBM_TIDialogUserInGroup on DialogUserInGroup for Insert not for Replication as begin declare @ProcName nvarchar(64) = object_name2(@@procid) declare @XUser nvarchar(64) declare @DebugSwitch int = 0 BEGIN TRY if exists (select top 1 1 from inserted) goto start return start: declare3 @GenProcID varchar(38) select @GenProcID = dbo.QBM_FGISessionContext('') if @Debugswitch > 0 begin print 'entry : ' + @ProcName end if @XUser = 'QBM_PDialogUserInGroupCorrect'4 begin if @Debugswitch > 0 begin print 'recursion exit : ' + @ProcName end goto endlabel end declare @DBQueueElements_01 QBM_YDBQueueRaw insert into @DBQueueElements_015 (object, subobject, genprocid) select x.uid, null, @GenProcID from ( select distinct UID_DialogUser as uid from inserted ) as x exec QBM_PDBQueueInsert_Bulk6 'QBM-K-DialogUserInGroup', @DBQueueElements_01 if @Debugswitch > 0 begin print 'ready : ' + @ProcName end END TRY BEGIN CATCH exec QBM_PSessionErrorAdd7 default RAISERROR ('', 18, 1) WITH NOWAIT END CATCH if @Debugswitch > 0 begin print 'exit : ' + @ProcName end endLabel: return end 8