docs.RepoObject_Plantuml_ObjectRefList_1_1 - V

type: V ( view ), modify_date: 2022-09-19 12:20:58

RepoObject_guid: 7F07068D-19F6-EB11-850C-A81E8446D5B0

Description

Examples

Entity Diagram

entity-docs.repoobject_plantuml_objectreflist_1_1

Columns

Table 1. Columns of docs.RepoObject_Plantuml_ObjectRefList_1_1 - V
PK Column Name Data Type NULL? ID

1

uniqueidentifier

NOT NULL

nvarchar(max)

NULL

Foreign Key Diagram

entity_1_1_fk-docs.repoobject_plantuml_objectreflist_1_1

References

Referencing Objects

Object Reference Diagram - 1 1

entity_1_1_objectref-docs.repoobject_plantuml_objectreflist_1_1

Object Reference Diagram - Referenced - 30 0

entity_30_0_objectref-docs.repoobject_plantuml_objectreflist_1_1

Object Reference Diagram - Referencing - 0 30

entity_0_30_objectref-docs.repoobject_plantuml_objectreflist_1_1

Column Reference Diagram

entity_1_1_colref-docs.repoobject_plantuml_objectreflist_1_1

Indexes

PK_RepoObject_Plantuml_ObjectRefList_1_1

Column Details

_

RepoObject_guid

1

RepoObject_guid

uniqueidentifier

NOT NULL

Referenced Columns

ObjectRefList

ObjectRefList

nvarchar(max)

NULL

sql_modules_definition

docs.RepoObject_Plantuml_ObjectRefList_1_1 - V script
CREATE View docs.RepoObject_Plantuml_ObjectRefList_1_1
As
Select
    ro.RepoObject_guid
  --, cultures_name = Cast('' As NVarchar(10))
  --, ro.RepoObject_fullname2
  , ObjectRefList = String_Agg (
                                   Concat (
                                              Cast(N'' As NVarchar(Max))
                                            , objectref.referenced_puml_entity
                                            , ' <.. '
                                            , objectref.referencing_puml_entity
                                          )
                                 , Char ( 13 ) + Char ( 10 )
                               ) Within Group(Order By
                                                  objectref.referenced_puml_entity
                                                , objectref.referencing_puml_entity)
From
    repo.RepoObject As ro
    Inner Join
    (
        --Select
        --    Object1.RepoObject_fullname2 As Referencing_ro_fullname2
        --  , Object1.RepoObject_guid      As Referencing_ro_guid
        --  , Object2.RepoObject_fullname2 As Referenced_ro_fullname2
        --  , Object2.RepoObject_guid      As Referenced_ro_guid
        --From
        --    graph.RepoObject As Object1
        --  , graph.ReferencedObject As referenced
        --  , graph.RepoObject As Object2
        --Where Match(
        --    Object1-(referenced)->Object2)
        Select
            Referenced_ro_guid     = referenced_RepoObject_guid
          , referenced_puml_entity
          , Referencing_ro_guid    = referencing_RepoObject_guid
          , referencing_puml_entity
        From
            reference.RepoObject_reference_T
    )               As objectref
        On
        objectref.Referencing_ro_guid   = ro.RepoObject_guid
        Or objectref.Referenced_ro_guid = ro.RepoObject_guid
Group By
    ro.RepoObject_guid