dbo.RPS_ZPersonHasObject
Stored ProcedureSQL_STORED_PROCEDURESandbox DB
Interpretation
- Database routine. Review parameters, called procedures, DBQueue inserts, and QBM_PJobCreate helper calls before assuming side effects.
Relations
- No extracted relations.
Typed Edges
- references source dbo.QER_FCVXOriginToInheritInfo source text reference
- references source dbo.QER_FGIBitPatternInheritInfo source text reference
- references source dbo.QBM_PDBQueueCalculateDelta source text reference
- references source dbo.QBM_PSessionErrorAdd source text reference
- references source dbo.QER_PPersonHasObjectPostProc source text reference
References
- dbo.QER_FCVXOriginToInheritInfo
- dbo.QER_FGIBitPatternInheritInfo
- dbo.QBM_PDBQueueCalculateDelta
- dbo.QBM_PSessionErrorAdd
- dbo.QER_PPersonHasObjectPostProc
Referenced By
- No direct source references extracted.
Complete Source
1CREATE PROCEDURE RPS_ZPersonHasObject(2 @SlotNumber int3)4AS5BEGIN6 DECLARE @Sourcedata QBM_YDataForDelta,7 @CountDeltaQantity int,8 @CountDeltaOrigin int9 DECLARE @DBQueueCurrent QBM_YDBQueueCurrent10 DECLARE @QER_BitPatternInherit_Direct int = dbo.QER_FGIBitPatternInheritInfo('|Direct|',11 0)12 DECLARE @QER_BitPatternInherit_Master int = dbo.QER_FGIBitPatternInheritInfo('|Master|',13 0)14 BEGIN TRY15 INSERT INTO @DBQueueCurrent(UID_DialogDBQueue,16 UID_Parameter,17 UID_SubParameter,18 GenProcID)19 SELECT20 UID_DialogDBQueue,21 UID_Parameter,22 UID_SubParameter,23 GenProcID24 FROM QBMDBQueueCurrent cu25 WITH(readpast)26 WHERE27 cu.SlotNumber = @SlotNumber28 IF @@rowcount = 029 BEGIN30 GOTO EndLabel31 END32 INSERT INTO @SourceData(IsUpcommingContent,33 XOriginAfter,34 Element,35 AssignedElement,36 XOriginBefore)37 SELECT38 0,39 0,40 pho.UID_Person,41 pho.ObjectKey,42 pho.InheritInfo43 FROM PersonHasObject pho44 JOIN @DBQueueCurrent x45 ON pho.UID_Person = x.uid_parameter46 WHERE47 pho.ObjectKey LIKE '<Key><T>RPSReport</T>%' OR pho.ObjectKey LIKE '<Key><T>RPSSubscription</T>%'48 INSERT INTO @SourceData(IsUpcommingContent,49 XOriginBefore,50 Element,51 AssignedElement,52 XOriginAfter)53 SELECT54 1,55 0,56 y.uid_person,57 z.XObjectKey,58 dbo.QER_FCVXOriginToInheritInfo(y.XOrigin)59 FROM PersonHasRPSReport y60 JOIN @DBQueueCurrent x61 ON y.uid_person= x.uid_parameter AND y.XOrigin > 0 AND y.XIsInEffect = 162 JOIN RPSReport z63 ON y.uid_RPSReport = z.uid_RPSReport64 INSERT INTO @SourceData(IsUpcommingContent,65 XOriginBefore,66 Element,67 AssignedElement,68 XOriginAfter)69 SELECT70 1,71 0,72 y.uid_person,73 y.XObjectKey,74 @QER_BitPatternInherit_Direct75 FROM RPSSubscription y76 JOIN @DBQueueCurrent x77 ON y.uid_person= x.uid_parameter78 INSERT INTO @SourceData(IsUpcommingContent,79 XOriginBefore,80 Element,81 AssignedElement,82 XOriginAfter)83 SELECT84 1,85 0,86 m.uid_person,87 pho.objectkey,88 @QER_BitPatternInherit_Master89 FROM @DBQueueCurrent x90 JOIN person m91 ON m.UID_Person = x.uid_parameter92 JOIN person s93 ON s.UID_PersonMasterIdentity = m.uid_Person94 JOIN PersonHasObject pho95 ON pho.uid_person = s.uid_person96 WHERE97 pho.ObjectKey LIKE '<Key><T>RPSReport</T>%' OR pho.ObjectKey LIKE '<Key><T>RPSSubscription</T>%' berechnen:98 EXEC QBM_PDBQueueCalculateDelta @SourceData,99 @DeltaQuantity = 1,100 @DeltaDelete = 1,101 @DeltaInsert = 1,102 @DeltaOrigin = 1,103 @CountDeltaQantity = @CountDeltaQantity OUTPUT,104 @CountDeltaOrigin = @CountDeltaOrigin OUTPUT,105 @UseIsInEffect = 0,106 @SlotNumber = @SlotNumber,107 @DBQueueCurrentExtern = @DBQueueCurrent108 EXEC QER_PPersonHasObjectPostProc @SlotNumber,109 @CountDeltaOrigin,110 @CountDeltaQantity,111 'RPS-K-PersonHasObject'112 END TRY113 BEGIN CATCH114 EXEC QBM_PSessionErrorAdd DEFAULT115 RAISERROR('',116 18,117 1)118 WITH NOWAIT119 END CATCH120 endLabel:121END
Open raw exported source
1 create procedure RPS_ZPersonHasObject (@SlotNumber int) AS begin declare @Sourcedata QBM_YDataForDelta , @CountDeltaQantity int , @CountDeltaOrigin2 int declare @DBQueueCurrent QBM_YDBQueueCurrent declare @QER_BitPatternInherit_Direct int = dbo.QER_FGIBitPatternInheritInfo('|Direct|', 0) declare @QER_BitPatternInherit_Master3 int = dbo.QER_FGIBitPatternInheritInfo('|Master|', 0) BEGIN TRY insert into @DBQueueCurrent(UID_DialogDBQueue, UID_Parameter, UID_SubParameter, GenProcID4) select UID_DialogDBQueue, UID_Parameter, UID_SubParameter, GenProcID from QBMDBQueueCurrent cu with (readpast) where cu.SlotNumber = @SlotNumber if @@rowcount5 = 0 begin goto EndLabel end insert into @SourceData( IsUpcommingContent, XOriginAfter , Element, AssignedElement, XOriginBefore ) select 0, 0 , pho.UID_Person6, pho.ObjectKey, pho.InheritInfo from PersonHasObject pho join @DBQueueCurrent x on pho.UID_Person = x.uid_parameter where pho.ObjectKey like '<Key><T>RPSReport</T>%'7 or pho.ObjectKey like '<Key><T>RPSSubscription</T>%' insert into @SourceData( IsUpcommingContent, XOriginBefore , Element, AssignedElement, XOriginAfter8 ) select 1, 0 , y.uid_person, z.XObjectKey, dbo.QER_FCVXOriginToInheritInfo(y.XOrigin) from PersonHasRPSReport y join @DBQueueCurrent x on y.uid_person=9 x.uid_parameter and y.XOrigin > 0 and y.XIsInEffect = 1 join RPSReport z on y.uid_RPSReport = z.uid_RPSReport insert into @SourceData( IsUpcommingContent10, XOriginBefore , Element, AssignedElement, XOriginAfter ) select 1, 0 , y.uid_person, y.XObjectKey, @QER_BitPatternInherit_Direct from RPSSubscription11 y join @DBQueueCurrent x on y.uid_person= x.uid_parameter insert into @SourceData( IsUpcommingContent, XOriginBefore , Element, AssignedElement, XOriginAfter12 ) select 1, 0 , m.uid_person, pho.objectkey, @QER_BitPatternInherit_Master from @DBQueueCurrent x join person m on m.UID_Person = x.uid_parameter join13 person s on s.UID_PersonMasterIdentity = m.uid_Person join PersonHasObject pho on pho.uid_person = s.uid_person where pho.ObjectKey like '<Key><T>RPSReport</T>%'14 or pho.ObjectKey like '<Key><T>RPSSubscription</T>%' berechnen: exec QBM_PDBQueueCalculateDelta @SourceData, @DeltaQuantity = 1, @DeltaDelete = 1, @DeltaInsert15 = 1, @DeltaOrigin = 1, @CountDeltaQantity = @CountDeltaQantity output , @CountDeltaOrigin = @CountDeltaOrigin output , @UseIsInEffect = 0 , @SlotNumber16 = @SlotNumber , @DBQueueCurrentExtern = @DBQueueCurrent exec QER_PPersonHasObjectPostProc @SlotNumber , @CountDeltaOrigin , @CountDeltaQantity , 'RPS-K-PersonHasObject'17 END TRY BEGIN CATCH exec QBM_PSessionErrorAdd default RAISERROR ('', 18, 1) WITH NOWAIT END CATCH endLabel: end 18