reference.additional_Reference_guid - V

type: V ( view ), modify_date: 2022-01-05 18:06:33

RepoObject_guid: 9DB0B5F7-B004-EC11-8514-A81E8446D5B0

Description

Examples

Entity Diagram

entity-reference.additional_reference_guid

Columns

Table 1. Columns of reference.additional_Reference_guid - V
PK Column Name Data Type NULL? ID

nvarchar(128)

NOT NULL

nvarchar(128)

NOT NULL

nvarchar(128)

NULL

nvarchar(128)

NULL

nvarchar(128)

NULL

nvarchar(261)

NULL

int

NULL

bit

NULL

nvarchar(128)

NOT NULL

uniqueidentifier

NULL

uniqueidentifier

NULL

nvarchar(128)

NOT NULL

char(2)

NULL

nvarchar(128)

NOT NULL

nvarchar(128)

NOT NULL

nvarchar(128)

NULL

nvarchar(128)

NULL

nvarchar(128)

NULL

nvarchar(261)

NULL

int

NULL

bit

NULL

nvarchar(128)

NOT NULL

uniqueidentifier

NULL

uniqueidentifier

NULL

nvarchar(128)

NOT NULL

char(2)

NULL

Foreign Key Diagram

entity_1_1_fk-reference.additional_reference_guid

References

Object Reference Diagram - 1 1

entity_1_1_objectref-reference.additional_reference_guid

Object Reference Diagram - Referenced - 30 0

entity_30_0_objectref-reference.additional_reference_guid

Object Reference Diagram - Referencing - 0 30

entity_0_30_objectref-reference.additional_reference_guid

Column Reference Diagram

entity_1_1_colref-reference.additional_reference_guid

Indexes

idx_additional_Reference_guid__1

idx_additional_Reference_guid__2

idx_additional_Reference_guid__3

idx_additional_Reference_guid__4

Column Details

_

referenced_AntoraComponent

referenced_AntoraComponent

nvarchar(128)

NOT NULL

referenced_AntoraModule

referenced_AntoraModule

nvarchar(128)

NOT NULL

referenced_external_AntoraComponent

referenced_external_AntoraComponent

nvarchar(128)

NULL

referenced_external_AntoraModule

referenced_external_AntoraModule

nvarchar(128)

NULL

referenced_fullname

referenced_fullname

nvarchar(261)

NULL

Description

(concat('[',[RepoObject_schema_name],'].[',[RepoObject_name],']'))


referencing_AntoraComponent

referencing_AntoraComponent

nvarchar(128)

NOT NULL

referencing_AntoraModule

referencing_AntoraModule

nvarchar(128)

NOT NULL

referencing_external_AntoraComponent

referencing_external_AntoraComponent

nvarchar(128)

NULL

referencing_external_AntoraModule

referencing_external_AntoraModule

nvarchar(128)

NULL

referencing_fullname

referencing_fullname

nvarchar(261)

NULL

Description

(concat('[',[RepoObject_schema_name],'].[',[RepoObject_name],']'))


sql_modules_definition

reference.additional_Reference_guid - V script
CREATE View reference.additional_Reference_guid
As
Select
    T1.referenced_AntoraComponent
  , T1.referenced_AntoraModule
  , referenced_external_AntoraComponent  = ro1.external_AntoraComponent
  , referenced_external_AntoraModule     = ro1.external_AntoraModule
  , T1.referenced_Schema
  , T1.referenced_Object
  , T1.referenced_Column
  , referenced_fullname                  = ro1.RepoObject_fullname
  , referenced_id                        = ro1.SysObject_id
  , referenced_RepoObject_guid           = ro1.RepoObject_guid
  , referenced_RepoObjectColumn_guid     = roc1.RepoObjectColumn_guid
  , referenced_type                      = ro1.RepoObject_type
  , referenced_is_external               = ro1.is_external
  , T1.referencing_AntoraComponent
  , T1.referencing_AntoraModule
  , referencing_external_AntoraComponent = ro2.external_AntoraComponent
  , referencing_external_AntoraModule    = ro2.external_AntoraModule
  , T1.referencing_Schema
  , T1.referencing_Object
  , T1.referencing_Column
  , referencing_fullname                 = ro2.RepoObject_fullname
  , referencing_id                       = ro2.SysObject_id
  , referencing_RepoObject_guid          = ro2.RepoObject_guid
  , referencing_RepoObjectColumn_guid    = roc2.RepoObjectColumn_guid
  , referencing_type                     = ro2.RepoObject_type
  , referencing_is_external              = ro2.is_external
--, AntoraComponent                      = AntoraComponent.Parameter_value_result
--, AntoraModule                         = AntoraModule.Parameter_value_result
From
    reference.additional_Reference As T1
    Left Outer Join
        repo.RepoObject            As ro1
            On
            ro1.RepoObject_schema_name            = T1.referenced_Schema
            And ro1.RepoObject_name               = T1.referenced_Object
            And
            (
                ro1.is_external                   = 0
                Or
                (
                    ro1.external_AntoraComponent  = T1.referenced_AntoraComponent
                    And ro1.external_AntoraModule = T1.referenced_AntoraModule
                )
            )

    Left Outer Join
        repo.RepoObject            As ro2
            On
            ro2.RepoObject_schema_name            = T1.referencing_Schema
            And ro2.RepoObject_name               = T1.referencing_Object
            And
            (
                ro2.is_external                   = 0
                Or
                (
                    ro2.external_AntoraComponent  = T1.referencing_AntoraComponent
                    And ro2.external_AntoraModule = T1.referencing_AntoraModule
                )
            )

    Left Outer Join
        repo.RepoObjectColumn      As roc1
            On
            roc1.RepoObject_guid                  = ro1.RepoObject_guid
            And roc1.Column_name                  = T1.referenced_Column

    Left Outer Join
        repo.RepoObjectColumn      As roc2
            On
            roc2.RepoObject_guid                  = ro2.RepoObject_guid
            And roc2.Column_name                  = T1.referencing_Column
Where
    Not ro1.RepoObject_guid Is Null
    And Not ro2.RepoObject_guid Is Null