docs.ObjectRefCyclic_EntityList - V

type: V ( view ), modify_date: 2022-09-08 16:28:45

RepoObject_guid: 84E72F09-C5FD-EB11-850F-A81E8446D5B0

Description

Examples

Entity Diagram

entity-docs.objectrefcyclic_entitylist

Columns

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

nvarchar(10)

NOT NULL

nvarchar(max)

NULL

nvarchar(max)

NULL

nvarchar(max)

NULL

Foreign Key Diagram

entity_1_1_fk-docs.objectrefcyclic_entitylist

References

Referencing Objects

Object Reference Diagram - 1 1

entity_1_1_objectref-docs.objectrefcyclic_entitylist

Object Reference Diagram - Referenced - 30 0

entity_30_0_objectref-docs.objectrefcyclic_entitylist

Object Reference Diagram - Referencing - 0 30

entity_0_30_objectref-docs.objectrefcyclic_entitylist

Column Reference Diagram

entity_1_1_colref-docs.objectrefcyclic_entitylist

Indexes

idx_ObjectRefCyclic_EntityList__1

Column Details

_

cultures_name

cultures_name

nvarchar(10)

NOT NULL

PumlEntityList

PumlEntityList

nvarchar(max)

NULL

PumlEntityOnlyPkList

PumlEntityOnlyPkList

nvarchar(max)

NULL

XrefEntityList

XrefEntityList

nvarchar(max)

NULL

sql_modules_definition

docs.ObjectRefCyclic_EntityList - V script
CREATE View docs.ObjectRefCyclic_EntityList
As
Select
    rop.cultures_name
  , PumlEntityList       =
  --
  String_Agg ( Cast(rop.RepoObject_Puml As NVarchar(Max)), Char ( 13 ) + Char ( 10 )) Within Group(Order By
                                                                                                       ro.ro_fullname2)
  , PumlEntityOnlyPkList =
  --
  String_Agg ( Cast(rop.RepoObject_PumlOnlyPK As NVarchar(Max)), Char ( 13 ) + Char ( 10 )) Within Group(Order By
                                                                                                             ro.ro_fullname2)
  , XrefEntityList       =
  --
  String_Agg (
                 Concat (
                            --* xref:sqldb:target-page-filename.adoc[link text]
                            --we need to convert to first argument nvarchar(max) to avoid the limit of 8000 byte
                            Cast('* xref:sqldb:' As NVarchar(Max))
                          , docs.fs_cleanStringForFilename ( ro.ro_fullname2 )
                          , '.adoc[]'
                        )
               , Char ( 13 ) + Char ( 10 )
             ) Within Group(Order By
                                ro.ro_fullname2)
From
    docs.RepoObject_Plantuml_Entity_T As rop
    Inner Join
    (
        Select
            ro_guid      = Referenced_guid
          , ro_fullname2 = Referenced_fullname2
        From
            reference.ReferenceTree_cyclic_union
        Union
        Select
            Referencing_guid
          , Referencing_fullname2
        From
            reference.ReferenceTree_cyclic_union
    )                                 As ro
        On
        ro.ro_guid = rop.RepoObject_guid
Group By
    rop.cultures_name