Back to OIM Explorer

dbo.QBM_TUDialogObject

Database TriggerSQL_TRIGGERSandbox DB

Database Trigger on DialogObject. Bulk DBQueue insert -> QBM-K-CommonPrepropObject / QBM_ZPrePropObject at line 12; References QBM_PDBQueueInsert_Bulk; Trigger parent table: DialogObject

Source: sandbox-db sys.sql_modules

Source size: 1.483 characters

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-CommonPrepropObject / QBM_ZPrePropObject at line 12
  • References QBM_PDBQueueInsert_Bulk
  • Trigger parent table: DialogObject

Typed Edges

  • queues DBQueue task QBM_ZPrePropObject at line 12 Bulk DBQueue insert -> QBM-K-CommonPrepropObject / QBM_ZPrePropObject at line 12
  • trigger on table DialogObject Trigger parent table: DialogObject
  • references source dbo.QBM_FGISessionContext source text reference
  • references source dbo.QBM_PDBQueueInsert_Bulk source text reference
  • references source dbo.QBM_PPrePropCheckSyntax source text reference
  • references source dbo.QBM_PSessionErrorAdd source text reference
  • references source dbo.QBM_PSQLCheckExecutable source text reference

Complete Source

SQL72 lines
1CREATE trigger QBM_TUDialogObject2  ON DialogObject FOR3UPDATE NOT FOR Replication4AS5BEGIN6  DECLARE @SQLToCheck QBM_YParameterList7  DECLARE @ConditionsToCheck QBM_YParameterList8  BEGIN TRY9    IF EXISTS(10      SELECT TOP 1 111      FROM inserted)12    GOTO start13    IF EXISTS(14      SELECT TOP 1 115      FROM deleted)16    GOTO start17    RETURN start:18    DECLARE @GenProcID varchar(38)19    SELECT @GenProcID = dbo.QBM_FGISessionContext('')20    IF21    UPDATE(WhereClause)22    BEGIN23      INSERT INTO @SQLToCheck(Parameter1,24      ContentFull)25      SELECT26        c.XObjectKey,27        'select top 1 1 as columnvalue from ' + t.TableName + '28		 where (29		 ' + c.WhereClause + '30		 )'31      FROM inserted c32      JOIN DialogTable t33        ON c.UID_DialogTable = t.UID_DialogTable34      WHERE35        c.WhereClause > ' '36      EXEC QBM_PSQLCheckExecutable @SQLToCheck,37        @RaiseError = 138    END39    IF40    UPDATE(PreprocessorCondition)41    BEGIN42      INSERT INTO @ConditionsToCheck(ContentFull)43      SELECT i.PreProcessorCondition44      FROM inserted i45      EXEC QBM_PPrePropCheckSyntax @ConditionsToCheck46      DECLARE @DBQueueElements_01 QBM_YDBQueueRaw47      INSERT INTO @DBQueueElements_01(object,48      subobject,49      genprocid)50      SELECT51        x.uid,52        NULL,53        @GenProcID54      FROM(55      SELECT i.uid_dialogObject AS UID56      FROM DialogObject i57      JOIN deleted d58        ON i.uid_dialogObject = d.uid_dialogObject59      WHERE60        isnull(i.PreprocessorCondition, N '') <> isnull(d.PreprocessorCondition, N '')) AS x61      EXEC QBM_PDBQueueInsert_Bulk 'QBM-K-CommonPrepropObject',62        @DBQueueElements_0163    END64  END TRY65  BEGIN CATCH66    EXEC QBM_PSessionErrorAdd DEFAULT67    RAISERROR('',68    18,69    1)70      WITH NOWAIT71  END CATCH72END
Open raw exported source
SQL ยท Raw14 lines
1 create   trigger QBM_TUDialogObject on DialogObject  for Update not for Replication as begin  declare @SQLToCheck QBM_YParameterList declare @ConditionsToCheck2 QBM_YParameterList BEGIN TRY if exists (select top 1 1 from inserted) goto start if exists (select top 1 1 from deleted) goto start return start: declare3 @GenProcID varchar(38) select @GenProcID = dbo.QBM_FGISessionContext('')  if update(WhereClause) begin insert into @SQLToCheck(Parameter1, ContentFull4) select c.XObjectKey, 'select top 1 1 as columnvalue from ' + t.TableName + '5		 where (6		 ' + c.WhereClause + '7		 )' from inserted c  join DialogTable8 t on c.UID_DialogTable = t.UID_DialogTable where c.WhereClause > ' ' exec QBM_PSQLCheckExecutable @SQLToCheck, @RaiseError = 1 end  if update(PreprocessorCondition9) begin  insert into @ConditionsToCheck (ContentFull) select i.PreProcessorCondition from inserted i exec QBM_PPrePropCheckSyntax @ConditionsToCheck  declare10 @DBQueueElements_01 QBM_YDBQueueRaw insert into @DBQueueElements_01 (object, subobject, genprocid) select x.uid, null, @GenProcID from (select i.uid_dialogObject11 as UID from DialogObject i join deleted d on i.uid_dialogObject = d.uid_dialogObject where isnull(i.PreprocessorCondition,N'') <> isnull(d.PreprocessorCondition12,N'') ) as x exec QBM_PDBQueueInsert_Bulk 'QBM-K-CommonPrepropObject', @DBQueueElements_01 end END TRY BEGIN CATCH exec QBM_PSessionErrorAdd default RAISERROR13 ('', 18, 1) WITH NOWAIT END CATCH end 14