docs.RepoObject_PlantUml_FkRefList - V

type: V ( view ), modify_date: 2022-09-19 12:22:25

RepoObject_guid: 1E224606-439A-EB11-84F5-A81E8446D5B0

Description

Examples

Entity Diagram

entity-docs.repoobject_plantuml_fkreflist

Columns

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

1

uniqueidentifier

NULL

nvarchar(max)

NULL

nvarchar(257)

NULL

Foreign Key Diagram

entity_1_1_fk-docs.repoobject_plantuml_fkreflist

References

Referencing Objects

Object Reference Diagram - 1 1

entity_1_1_objectref-docs.repoobject_plantuml_fkreflist

Object Reference Diagram - Referenced - 30 0

entity_30_0_objectref-docs.repoobject_plantuml_fkreflist

Object Reference Diagram - Referencing - 0 30

entity_0_30_objectref-docs.repoobject_plantuml_fkreflist

Column Reference Diagram

entity_1_1_colref-docs.repoobject_plantuml_fkreflist

Indexes

PK_RepoObject_PlantUml_FkRefList

Column Details

_

RepoObject_guid

1

RepoObject_guid

uniqueidentifier

NULL

FkRefList

FkRefList

nvarchar(max)

NULL

RepoObject_fullname2

RepoObject_fullname2

nvarchar(257)

NULL

sql_modules_definition

docs.RepoObject_PlantUml_FkRefList - V script
CREATE View docs.RepoObject_PlantUml_FkRefList
As
Select
    ro.RepoObject_guid
  --, cultures_name        = Cast('' As NVarchar(10))
  , RepoObject_fullname2 = Max ( ro.RepoObject_fullname2 )
  , FkRefList            = String_Agg (
                                          Concat (
                                                     Cast(N'' As NVarchar(Max))
                                                   , '"'
                                                   , docs.fs_cleanStringForPuml ( fk.referenced_RepoObject_fullname2 )
                                                   , '::'
                                                   , docs.fs_cleanStringForPuml ( fk.referenced_index_name )
                                                   , '"'
                                                   , ' <-- '
                                                   , '"'
                                                   , docs.fs_cleanStringForPuml ( fk.referencing_RepoObject_fullname2 )
                                                   , '::'
                                                   , docs.fs_cleanStringForPuml ( fk.referencing_index_name )
                                                   , '"'
                                                 )
                                        , Char ( 13 ) + Char ( 10 )
                                      ) Within Group(Order By
                                                         fk.referenced_RepoObject_fullname2
                                                       , fk.referenced_index_name
                                                       , fk.referencing_RepoObject_fullname2
                                                       , fk.referencing_index_name)
From
    repo.RepoObject_related_FK_union    As ro
    Inner Join
        repo.ForeignKey_Indexes_union_T As fk
            On
            (
                ro.included_RepoObject_guid = fk.referenced_RepoObject_guid
                And ro.RepoObject_guid      = fk.referencing_RepoObject_guid
            )
            Or
            (
                ro.included_RepoObject_guid = fk.referencing_RepoObject_guid
                And ro.RepoObject_guid      = fk.referenced_RepoObject_guid
            )
Group By
    ro.RepoObject_guid