reference.RepoObject_referencing_level - V
type: V ( view ), modify_date: 2021-08-17 19:22:35
RepoObject_guid: 28E90A1E-7495-EB11-84F4-A81E8446D5B0
Columns
PK | Column Name | Data Type | NULL? | ID |
---|---|---|---|---|
|
|
sql_modules_definition
reference.RepoObject_referencing_level - V script
/*
Select
--
Object1.RepoObject_guid As StartingNode_guid
, Object1.RepoObject_fullname As StartingNode_fullname
, Object1.RepoObject_fullname2 As StartingNode_fullname2
, Count ( Object2.RepoObject_fullname ) WITHIN Group(GRAPH Path) As referencing_level
, Last_Value ( Object2.[RepoObject_guid] ) Within Group(GRAPH Path) As LastNode_guid
, Last_Value ( Object2.[RepoObject_fullname] ) Within Group(GRAPH Path) As LastNode_fullname
, Last_Value ( Object2.[RepoObject_fullname2] ) Within Group(GRAPH Path) As LastNode_fullname2
, String_Agg ( Object2.[RepoObject_fullname], '->' ) Within Group(GRAPH Path) As ListNode
From
[graph].[RepoObject] As Object1
, [graph].[ReferencingObject] For Path As referencing
, [graph].[RepoObject] For Path As Object2
Where Match(
SHORTEST_PATH(Object1(-(referencing)->Object2)+));
*/
CREATE View reference.RepoObject_referencing_level
As
Select
a = 1