Added stored procedures to support determining when treeview needs to be refreshed based on other user activities
This commit is contained in:
parent
1630834fb6
commit
f66cb15dd3
@ -3382,8 +3382,9 @@ where FoundEnd = 0
|
|||||||
)
|
)
|
||||||
insert into @Children select ItemID, ContentID, FormatID from Itemz
|
insert into @Children select ItemID, ContentID, FormatID from Itemz
|
||||||
OPTION (MAXRECURSION 10000)
|
OPTION (MAXRECURSION 10000)
|
||||||
RETURN
|
|
||||||
END
|
END
|
||||||
|
RETURN
|
||||||
END
|
END
|
||||||
GO
|
GO
|
||||||
-- Display the status of Proc creation
|
-- Display the status of Proc creation
|
||||||
@ -3518,8 +3519,8 @@ UNION
|
|||||||
select TransitionID from Transitions TT
|
select TransitionID from Transitions TT
|
||||||
JOIN Itemz2 on ToID=ItemID and RangeID=ItemID and IsRange = 2
|
JOIN Itemz2 on ToID=ItemID and RangeID=ItemID and IsRange = 2
|
||||||
OPTION (MAXRECURSION 10000)
|
OPTION (MAXRECURSION 10000)
|
||||||
RETURN
|
|
||||||
END
|
END
|
||||||
|
RETURN
|
||||||
END
|
END
|
||||||
|
|
||||||
GO
|
GO
|
||||||
@ -3828,8 +3829,8 @@ BEGIN
|
|||||||
)
|
)
|
||||||
Select @FormatID = FormatID from Itemz ZZ Where FormatID is not null
|
Select @FormatID = FormatID from Itemz ZZ Where FormatID is not null
|
||||||
OPTION (MAXRECURSION 10000)
|
OPTION (MAXRECURSION 10000)
|
||||||
RETURN @FormatID
|
|
||||||
END
|
END
|
||||||
|
RETURN @FormatID
|
||||||
END
|
END
|
||||||
GO
|
GO
|
||||||
-- Display the status of Proc creation
|
-- Display the status of Proc creation
|
||||||
@ -7186,7 +7187,8 @@ AS
|
|||||||
[DTSActivity],
|
[DTSActivity],
|
||||||
[LastChanged],
|
[LastChanged],
|
||||||
[MachineName],
|
[MachineName],
|
||||||
[ProcessID]
|
[ProcessID],
|
||||||
|
(select convert(bigint,max(lastchanged)) from contents) LastContentChange
|
||||||
FROM [Sessions]
|
FROM [Sessions]
|
||||||
RETURN
|
RETURN
|
||||||
GO
|
GO
|
||||||
@ -7370,7 +7372,8 @@ AS
|
|||||||
[DTSActivity],
|
[DTSActivity],
|
||||||
[LastChanged],
|
[LastChanged],
|
||||||
[MachineName],
|
[MachineName],
|
||||||
[ProcessID]
|
[ProcessID],
|
||||||
|
(select convert(bigint,max(lastchanged)) from contents) LastContentChange
|
||||||
FROM [Sessions]
|
FROM [Sessions]
|
||||||
WHERE [SessionID]=@SessionID
|
WHERE [SessionID]=@SessionID
|
||||||
RETURN
|
RETURN
|
||||||
@ -7435,7 +7438,8 @@ BEGIN TRY -- Try Block
|
|||||||
[DTSActivity],
|
[DTSActivity],
|
||||||
[LastChanged],
|
[LastChanged],
|
||||||
[MachineName],
|
[MachineName],
|
||||||
[ProcessID]
|
[ProcessID],
|
||||||
|
(select convert(bigint,max(lastchanged)) from contents) LastContentChange
|
||||||
FROM [Sessions]
|
FROM [Sessions]
|
||||||
WHERE [SessionID]=0
|
WHERE [SessionID]=0
|
||||||
END
|
END
|
||||||
@ -7460,7 +7464,8 @@ BEGIN TRY -- Try Block
|
|||||||
[DTSActivity],
|
[DTSActivity],
|
||||||
[LastChanged],
|
[LastChanged],
|
||||||
[MachineName],
|
[MachineName],
|
||||||
[ProcessID]
|
[ProcessID],
|
||||||
|
(select convert(bigint,max(lastchanged)) from contents) LastContentChange
|
||||||
FROM [Sessions]
|
FROM [Sessions]
|
||||||
WHERE [SessionID]=SCOPE_IDENTITY()
|
WHERE [SessionID]=SCOPE_IDENTITY()
|
||||||
IF( @@TRANCOUNT > 0 ) COMMIT
|
IF( @@TRANCOUNT > 0 ) COMMIT
|
||||||
@ -7825,7 +7830,8 @@ BEGIN
|
|||||||
[DTSActivity],
|
[DTSActivity],
|
||||||
[LastChanged],
|
[LastChanged],
|
||||||
[MachineName],
|
[MachineName],
|
||||||
[ProcessID]
|
[ProcessID],
|
||||||
|
(select convert(bigint,max(lastchanged)) from contents) LastContentChange
|
||||||
FROM [Sessions]
|
FROM [Sessions]
|
||||||
WHERE DTSEnd IS NULL
|
WHERE DTSEnd IS NULL
|
||||||
END ELSE BEGIN
|
END ELSE BEGIN
|
||||||
@ -7899,7 +7905,8 @@ BEGIN
|
|||||||
[DTSActivity],
|
[DTSActivity],
|
||||||
[LastChanged],
|
[LastChanged],
|
||||||
[MachineName],
|
[MachineName],
|
||||||
[ProcessID]
|
[ProcessID],
|
||||||
|
(select convert(bigint,max(lastchanged)) from contents) LastContentChange
|
||||||
FROM [Sessions]
|
FROM [Sessions]
|
||||||
WHERE [SessionID] IN (SELECT SessionID FROM @CheckOuts)
|
WHERE [SessionID] IN (SELECT SessionID FROM @CheckOuts)
|
||||||
END
|
END
|
||||||
@ -9823,8 +9830,8 @@ DECLARE @FormatID as int
|
|||||||
)
|
)
|
||||||
Select @FormatID = FormatID from Itemz ZZ Where FormatID is not null
|
Select @FormatID = FormatID from Itemz ZZ Where FormatID is not null
|
||||||
OPTION (MAXRECURSION 10000)
|
OPTION (MAXRECURSION 10000)
|
||||||
RETURN @FormatID
|
|
||||||
END
|
END
|
||||||
|
RETURN @FormatID
|
||||||
END
|
END
|
||||||
GO
|
GO
|
||||||
-- Display the status of Proc creation
|
-- Display the status of Proc creation
|
||||||
@ -10739,7 +10746,7 @@ GO
|
|||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
CREATE PROCEDURE vesp_ListContentsAfterLastChanged2
|
CREATE PROCEDURE vesp_ListContentsAfterLastChanged2
|
||||||
(
|
(
|
||||||
@LastChanged timestamp,
|
@LastChanged bigint,
|
||||||
@UserID nvarchar(100)
|
@UserID nvarchar(100)
|
||||||
)
|
)
|
||||||
WITH EXECUTE AS OWNER
|
WITH EXECUTE AS OWNER
|
||||||
@ -10747,10 +10754,10 @@ AS
|
|||||||
BEGIN
|
BEGIN
|
||||||
SELECT
|
SELECT
|
||||||
cc.[ContentID],
|
cc.[ContentID],
|
||||||
cc.[LastChanged]
|
CONVERT(bigint,cc.[LastChanged]) LastContentChange
|
||||||
FROM [Contents] cc
|
FROM [Contents] cc
|
||||||
WHERE cc.LastChanged > @LastChanged
|
WHERE CONVERT(bigint,cc.LastChanged) > @LastChanged
|
||||||
AND cc.UserID != @UserID
|
-- AND cc.UserID != @UserID
|
||||||
ORDER BY LastChanged
|
ORDER BY LastChanged
|
||||||
RETURN
|
RETURN
|
||||||
END
|
END
|
||||||
@ -10811,3 +10818,35 @@ GO
|
|||||||
IF (@@Error = 0) PRINT 'Procedure Creation: getOwnerBySessionIDandFolderID Succeeded'
|
IF (@@Error = 0) PRINT 'Procedure Creation: getOwnerBySessionIDandFolderID Succeeded'
|
||||||
ELSE PRINT 'Procedure Creation: getOwnerBySessionIDandFolderID Error on Creation'
|
ELSE PRINT 'Procedure Creation: getOwnerBySessionIDandFolderID Error on Creation'
|
||||||
GO
|
GO
|
||||||
|
|
||||||
|
/****** Object: StoredProcedure [vesp_ListItemsAfterLastChanged] ******/
|
||||||
|
IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[vesp_ListItemsAfterLastChanged]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
|
||||||
|
DROP PROCEDURE vesp_ListItemsAfterLastChanged;
|
||||||
|
GO
|
||||||
|
|
||||||
|
/*****************************************************************************
|
||||||
|
Volian Enterprises - Proprietary Information - DO NOT COPY OR DISTRIBUTE
|
||||||
|
Copyright 2012 - Volian Enterprises, Inc. All rights reserved.
|
||||||
|
*****************************************************************************/
|
||||||
|
CREATE PROCEDURE vesp_ListItemsAfterLastChanged
|
||||||
|
(
|
||||||
|
@LastChanged bigint,
|
||||||
|
@UserID nvarchar(100)
|
||||||
|
)
|
||||||
|
WITH EXECUTE AS OWNER
|
||||||
|
AS
|
||||||
|
BEGIN
|
||||||
|
SELECT
|
||||||
|
dbo.ve_GetParentItem(ii.[ItemID]) ParentID,MAX(CONVERT(bigint,ii.[LastChanged])) LastItemChange
|
||||||
|
FROM [Items] ii
|
||||||
|
WHERE CONVERT(bigint,ii.LastChanged) > @LastChanged
|
||||||
|
-- AND cc.UserID != @UserID
|
||||||
|
GROUP BY dbo.ve_GetParentItem(ii.[ItemID])
|
||||||
|
ORDER BY MAX(CONVERT(bigint,ii.[LastChanged]))
|
||||||
|
RETURN
|
||||||
|
END
|
||||||
|
GO
|
||||||
|
-- Display the status of Proc creation
|
||||||
|
IF (@@Error = 0) PRINT 'Procedure Creation: vesp_ListItemsAfterLastChanged Succeeded'
|
||||||
|
ELSE PRINT 'Procedure Creation: vesp_ListItemsAfterLastChanged Error on Creation'
|
||||||
|
GO
|
||||||
|
Loading…
x
Reference in New Issue
Block a user