dbo.QER_TIPersonHasObject
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 -> QER-K-PersonHasObjectExtAtt / QER_ZPersonHasObjectExtAtt at line 4
- Bulk DBQueue insert -> QER-K-ShoppingRackPersonHasObject / QER_ZITShopPersonHasObjectFill at line 4
- Bulk DBQueue insert -> QER-K-ShoppingRackPersonHasObject / QER_ZITShopPersonHasObjectFill at line 7
- References QBM_PDBQueueInsert_Bulk
- Trigger parent table: PersonHasObject
Typed Edges
- queues DBQueue task QER_ZPersonHasObjectExtAtt at line 4 Bulk DBQueue insert -> QER-K-PersonHasObjectExtAtt / QER_ZPersonHasObjectExtAtt at line 4
- queues DBQueue task QER_ZITShopPersonHasObjectFill at line 4 Bulk DBQueue insert -> QER-K-ShoppingRackPersonHasObject / QER_ZITShopPersonHasObjectFill at line 4
- queues DBQueue task QER_ZITShopPersonHasObjectFill at line 7 Bulk DBQueue insert -> QER-K-ShoppingRackPersonHasObject / QER_ZITShopPersonHasObjectFill at line 7
- trigger on table PersonHasObject Trigger parent table: PersonHasObject
- references source dbo.QBM_FGISessionContext source text reference
- references source dbo.QBM_FGITableCountAll source text reference
- references source dbo.QBM_PDBQueueInsert_Bulk source text reference
- references source dbo.QBM_PSessionErrorAdd source text reference
- references source dbo.QER_TIPerson source text reference
References
- dbo.QBM_FGISessionContext
- dbo.QBM_FGITableCountAll
- dbo.QBM_PDBQueueInsert_Bulk
- dbo.QBM_PSessionErrorAdd
- dbo.QER_TIPerson
Referenced By
- No direct source references extracted.
Complete Source
1CREATE trigger QER_TIPersonHasObject2 ON PersonHasObject FOR3INSERT NOT FOR Replication4AS5BEGIN6 BEGIN TRY7 IF EXISTS(8 SELECT TOP 1 19 FROM inserted)10 GOTO start11 RETURN start:12 DECLARE @GenProcID varchar(38)13 SELECT @GenProcID = dbo.QBM_FGISessionContext('')14 IF dbo.QBM_FGITableCountAll('ObjectHasExtendedAttribute') > 015 BEGIN16 DECLARE @DBQueueElements_01 QBM_YDBQueueRaw17 INSERT INTO @DBQueueElements_01(object,18 subobject,19 genprocid)20 SELECT21 x.uid,22 NULL,23 @GenProcID24 FROM(25 SELECT26 DISTINCT d.UID_Person AS uid27 FROM inserted d28 WHERE29 d.ObjectKey NOT LIKE '<Key><T>ExtendedAttribute</T>%') AS x30 EXEC QBM_PDBQueueInsert_Bulk 'QER-K-PersonHasObjectExtAtt',31 @DBQueueElements_0132 END33 DECLARE @DBQueueElements_02 QBM_YDBQueueRaw34 INSERT INTO @DBQueueElements_02(object,35 subobject,36 genprocid)37 SELECT38 x.uid,39 NULL,40 @GenProcID41 FROM(42 SELECT43 DISTINCT pho.uid_Personwantsorg AS uid44 FROM inserted d45 JOIN HelperPWOPersonHasObject pho46 ON d.UID_Person = pho.uid_Person) AS x47 EXEC QBM_PDBQueueInsert_Bulk 'QER-K-ShoppingRackPersonHasObject',48 @DBQueueElements_0249 END TRY50 BEGIN CATCH51 EXEC QBM_PSessionErrorAdd DEFAULT52 RAISERROR('',53 18,54 1)55 WITH NOWAIT56 END CATCH57 ende:58 RETURN59END
Open raw exported source
1 create trigger QER_TIPersonHasObject on PersonHasObject for Insert not for Replication as begin BEGIN TRY if exists (select top 1 1 from inserted2) goto start return start: declare @GenProcID varchar(38) select @GenProcID = dbo.QBM_FGISessionContext('') if dbo.QBM_FGITableCountAll('ObjectHasExtendedAttribute'3) > 0 begin declare @DBQueueElements_01 QBM_YDBQueueRaw insert into @DBQueueElements_01 (object, subobject, genprocid) select x.uid, null,@GenProcID from4 ( select distinct d.UID_Person as uid from inserted d where d.ObjectKey not like '<Key><T>ExtendedAttribute</T>%' ) as x exec QBM_PDBQueueInsert_Bulk 5'QER-K-PersonHasObjectExtAtt', @DBQueueElements_01 end declare @DBQueueElements_02 QBM_YDBQueueRaw insert into @DBQueueElements_02 (object, subobject, 6genprocid) select x.uid, null, @GenProcID from ( select distinct pho.uid_Personwantsorg as uid from inserted d join HelperPWOPersonHasObject pho on d.UID_Person7 = pho.uid_Person ) as x exec QBM_PDBQueueInsert_Bulk 'QER-K-ShoppingRackPersonHasObject', @DBQueueElements_02 END TRY BEGIN CATCH exec QBM_PSessionErrorAdd8 default RAISERROR ('', 18, 1) WITH NOWAIT END CATCH ende: return end 9