repo.ForeignKey_gross - V

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

RepoObject_guid: FA24676D-1797-EB11-84F4-A81E8446D5B0

Description

Examples

Entity Diagram

entity-repo.foreignkey_gross

Columns

Table 1. Columns of repo.ForeignKey_gross - V
PK Column Name Data Type NULL? ID

tinyint

NULL

nvarchar(517)

NULL

uniqueidentifier

NULL

nvarchar(128)

NULL

int

NOT NULL

nvarchar(4000)

NOT NULL

uniqueidentifier

NULL

nvarchar(450)

NULL

nvarchar(4000)

NULL

nvarchar(4000)

NULL

nvarchar(261)

NULL

nvarchar(257)

NULL

uniqueidentifier

NULL

nvarchar(128)

NULL

nvarchar(128)

NULL

uniqueidentifier

NULL

nvarchar(450)

NULL

nvarchar(4000)

NULL

nvarchar(4000)

NULL

nvarchar(261)

NULL

nvarchar(257)

NULL

uniqueidentifier

NULL

nvarchar(128)

NULL

nvarchar(128)

NULL

tinyint

NULL

Foreign Key Diagram

entity_1_1_fk-repo.foreignkey_gross

References

Referencing Objects

Object Reference Diagram - 1 1

entity_1_1_objectref-repo.foreignkey_gross

Object Reference Diagram - Referenced - 30 0

entity_30_0_objectref-repo.foreignkey_gross

Object Reference Diagram - Referencing - 0 30

entity_0_30_objectref-repo.foreignkey_gross

Column Reference Diagram

entity_1_1_colref-repo.foreignkey_gross

Indexes

idx_ForeignKey_gross__1

Column Details

_

delete_referential_action

delete_referential_action

tinyint

NULL

ForeignKey_fullname

ForeignKey_fullname

nvarchar(517)

NULL

ForeignKey_guid

ForeignKey_guid

uniqueidentifier

NULL

ForeignKey_name

ForeignKey_name

nvarchar(128)

NULL

is_MatchingDatatypePattern

is_MatchingDatatypePattern

int

NOT NULL

referenced_AntoraXref

referenced_AntoraXref

nvarchar(4000)

NOT NULL

referenced_index_guid

referenced_index_guid

uniqueidentifier

NULL

referenced_index_name

referenced_index_name

nvarchar(450)

NULL

Referenced Columns

referenced_IndexPatternColumnDatatype

referenced_IndexPatternColumnDatatype

nvarchar(4000)

NULL

referenced_IndexPatternColumnName

referenced_IndexPatternColumnName

nvarchar(4000)

NULL

referenced_RepoObject_fullname

referenced_RepoObject_fullname

nvarchar(261)

NULL

referenced_RepoObject_fullname2

referenced_RepoObject_fullname2

nvarchar(257)

NULL

referenced_RepoObject_guid

referenced_RepoObject_guid

uniqueidentifier

NULL

referenced_SysObject_name

referenced_SysObject_name

nvarchar(128)

NULL

referenced_SysObject_schema_name

referenced_SysObject_schema_name

nvarchar(128)

NULL

referencing_index_guid

referencing_index_guid

uniqueidentifier

NULL

referencing_index_name

referencing_index_name

nvarchar(450)

NULL

Referenced Columns

referencing_IndexPatternColumnDatatype

referencing_IndexPatternColumnDatatype

nvarchar(4000)

NULL

referencing_IndexPatternColumnName

referencing_IndexPatternColumnName

nvarchar(4000)

NULL

referencing_RepoObject_fullname

referencing_RepoObject_fullname

nvarchar(261)

NULL

referencing_RepoObject_fullname2

referencing_RepoObject_fullname2

nvarchar(257)

NULL

referencing_RepoObject_guid

referencing_RepoObject_guid

uniqueidentifier

NULL

referencing_SysObject_name

referencing_SysObject_name

nvarchar(128)

NULL

referencing_SysObject_schema_name

referencing_SysObject_schema_name

nvarchar(128)

NULL

update_referential_action

update_referential_action

tinyint

NULL

sql_modules_definition

repo.ForeignKey_gross - V script
CREATE View [repo].[ForeignKey_gross]
As
Select
    fk.ForeignKey_guid
  , fk.is_MatchingDatatypePattern
  , fk.ForeignKey_name
  , fk.ForeignKey_fullname
  , fk.referenced_index_guid
  , referenced_index_name  = refed.index_name
  , fk.referenced_IndexPatternColumnDatatype
  , fk.referenced_IndexPatternColumnName
  , fk.referenced_RepoObject_fullname
  , fk.referenced_RepoObject_fullname2
  , fk.referenced_RepoObject_guid
  , fk.referenced_SysObject_name
  , fk.referenced_SysObject_schema_name
  , fk.referencing_index_guid
  , referencing_index_name = refing.index_name
  , fk.referencing_IndexPatternColumnDatatype
  , fk.referencing_IndexPatternColumnName
  , fk.referencing_RepoObject_fullname
  , fk.referencing_RepoObject_fullname2
  , fk.referencing_RepoObject_guid
  , fk.referencing_SysObject_name
  , fk.referencing_SysObject_schema_name
  , fk.delete_referential_action
  , fk.update_referential_action
  , referenced_AntoraXref  =
  --
  Concat (
             --++ForeignKey_name++ xref:aaa.bbb.adoc#index-pk_ccc[+pk_ccc+]
             '++' + fk.ForeignKey_name + '++ +'
           , Char ( 13 ) + Char ( 10 )
           , 'referenced: xref:' + docs.fs_cleanStringForFilename ( fk.referenced_RepoObject_fullname2 ) + '.adoc[], xref:'
             + docs.fs_cleanStringForFilename ( fk.referenced_RepoObject_fullname2 ) + '.adoc#' + 'index-'
             + docs.fs_cleanStringForAnchorId ( refed.index_name ) + '[+' + refed.index_name + '+]'
         )
From
    repo.ForeignKey_Indexes_union_T As fk
    Left Join
        repo.Index_gross            As refed
            On
            refed.index_guid  = fk.referenced_index_guid

    Left Join
        repo.Index_gross            As refing
            On
            refing.index_guid = fk.referencing_index_guid