property.RepoObjectProperty_InheritanceType_InheritanceDefinition - V

type: V ( view ), modify_date: 2021-09-13 23:31:37

RepoObject_guid: 64B33A4A-426D-EB11-84E2-A81E8446D5B0

Description

Examples

Entity Diagram

entity-property.repoobjectproperty_inheritancetype_inheritancedefinition

Columns

Table 1. Columns of property.RepoObjectProperty_InheritanceType_InheritanceDefinition - V
PK Column Name Data Type NULL? ID

1

uniqueidentifier

NOT NULL

2

nvarchar(128)

NOT NULL

nvarchar(261)

NULL

nvarchar(max)

NULL

nvarchar(max)

NULL

int

NULL

nvarchar(max)

NULL

nvarchar(max)

NULL

int

NULL

nvarchar(max)

NULL

nvarchar(261)

NOT NULL

char(2)

NOT NULL

nvarchar(4000)

NULL

nvarchar(4000)

NULL

tinyint

NULL

nvarchar(max)

NULL

nvarchar(max)

NULL

int

NULL

Foreign Key Diagram

entity_1_1_fk-property.repoobjectproperty_inheritancetype_inheritancedefinition

References

Object Reference Diagram - 1 1

entity_1_1_objectref-property.repoobjectproperty_inheritancetype_inheritancedefinition

Object Reference Diagram - Referenced - 30 0

entity_30_0_objectref-property.repoobjectproperty_inheritancetype_inheritancedefinition

Object Reference Diagram - Referencing - 0 30

entity_0_30_objectref-property.repoobjectproperty_inheritancetype_inheritancedefinition

Column Reference Diagram

entity_1_1_colref-property.repoobjectproperty_inheritancetype_inheritancedefinition

Indexes

PK_RepoObjectProperty_InheritanceType_InheritanceDefinition

idx_RepoObjectProperty_InheritanceType_InheritanceDefinition__2

idx_RepoObjectProperty_InheritanceType_InheritanceDefinition__3

Column Details

_

RepoObject_guid

1

RepoObject_guid

uniqueidentifier

NOT NULL

Referenced Columns

property_name

2

property_name

nvarchar(128)

NOT NULL

Inheritance_Source_fullname

Inheritance_Source_fullname

nvarchar(261)

NULL

Inheritance_StringAggSeparatorSql

Inheritance_StringAggSeparatorSql

nvarchar(max)

NULL

InheritanceDefinition

InheritanceDefinition

nvarchar(max)

NULL

InheritanceType

InheritanceType

int

NULL

Referenced Columns

par_Inheritance_StringAggSeparatorSql

par_Inheritance_StringAggSeparatorSql

nvarchar(max)

NULL

Description

(coalesce([Parameter_value],[Parameter_default_value]))


par_InheritanceDefintion

par_InheritanceDefintion

nvarchar(max)

NULL

Description

(coalesce([Parameter_value],[Parameter_default_value]))


par_InheritanceType

par_InheritanceType

int

NULL

Description

(TRY_CAST(left(coalesce([Parameter_value],[Parameter_default_value]),(4000)) AS [int]))


property_value

property_value

nvarchar(max)

NULL

RepoObject_fullname

RepoObject_fullname

nvarchar(261)

NOT NULL

Description

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


RepoObject_type

RepoObject_type

char(2)

NOT NULL

Referenced Columns

ro_Inheritance_StringAggSeparatorSql

ro_Inheritance_StringAggSeparatorSql

nvarchar(4000)

NULL

ro_InheritanceDefinition

ro_InheritanceDefinition

nvarchar(4000)

NULL

ro_InheritanceType

ro_InheritanceType

tinyint

NULL

Referenced Columns

sub_Inheritance_StringAggSeparatorSql

sub_Inheritance_StringAggSeparatorSql

nvarchar(max)

NULL

Description

(coalesce([Parameter_value],[Parameter_default_value]))


sub_InheritanceDefintion

sub_InheritanceDefintion

nvarchar(max)

NULL

Description

(coalesce([Parameter_value],[Parameter_default_value]))


sub_InheritanceType

sub_InheritanceType

int

NULL

Description

(TRY_CAST(left(coalesce([Parameter_value],[Parameter_default_value]),(4000)) AS [int]))


sql_modules_definition

property.RepoObjectProperty_InheritanceType_InheritanceDefinition - V script
CREATE View property.RepoObjectProperty_InheritanceType_InheritanceDefinition
As
Select
    --
    ro.RepoObject_guid
  , pn.property_name
  , rop.property_value
  , Inheritance_StringAggSeparatorSql     = Coalesce (
                                                         ro.Inheritance_StringAggSeparatorSql
                                                       , par_sub_sep.Parameter_value_result
                                                       , par_sep.Parameter_value_result
                                                     )
  , InheritanceDefinition                 = Coalesce (
                                                         ro.InheritanceDefinition
                                                       , par_sub_def.Parameter_value_result
                                                       , par_def.Parameter_value_result
                                                     )
  , ro.Inheritance_Source_fullname
  , InheritanceType                       = Coalesce ( ro.InheritanceType, par_sub.Parameter_value_result_int, par.Parameter_value_result_int )
  , ro.RepoObject_fullname
  , ro.RepoObject_type
  , ro_InheritanceType                    = ro.InheritanceType
  , sub_InheritanceType                   = par_sub.Parameter_value_result_int
  , par_InheritanceType                   = par.Parameter_value_result_int
  , ro_InheritanceDefinition              = ro.InheritanceDefinition
  , sub_InheritanceDefintion              = par_sub_def.Parameter_value_result
  , par_InheritanceDefintion              = par_def.Parameter_value_result
  , ro_Inheritance_StringAggSeparatorSql  = ro.Inheritance_StringAggSeparatorSql
  , sub_Inheritance_StringAggSeparatorSql = par_sub_sep.Parameter_value_result
  , par_Inheritance_StringAggSeparatorSql = par_sep.Parameter_value_result
From
    repo.RepoObject                               As ro
    Cross Join property.PropertyName_RepoObject_T As pn
    Left Join
        property.RepoObjectProperty As rop
            On
            rop.RepoObject_guid           = ro.RepoObject_guid
            And rop.property_name         = pn.property_name

    Left Join
        config.Parameter            As par_sub
            On
            par_sub.Parameter_name        = 'InheritanceType_object'
            And par_sub.sub_Parameter     = pn.property_name

    Left Join
        config.Parameter            As par
            On
            par.Parameter_name            = 'InheritanceType_object'
            And par.sub_Parameter         = ''

    Left Join
        config.Parameter            As par_sub_def
            On
            par_sub_def.Parameter_name    = 'InheritanceDefinition_object'
            And par_sub_def.sub_Parameter = pn.property_name

    Left Join
        config.Parameter            As par_def
            On
            par_def.Parameter_name        = 'InheritanceDefinition_object'
            And par_def.sub_Parameter     = ''

    Left Join
        config.Parameter            As par_sub_sep
            On
            par_sub_sep.Parameter_name    = 'Inheritance_StringAggSeparatorSql_object'
            And par_sub_sep.sub_Parameter = pn.property_name

    Left Join
        config.Parameter            As par_sep
            On
            par_sep.Parameter_name        = 'Inheritance_StringAggSeparatorSql_object'
            And par_sep.sub_Parameter     = ''
Where
    pn.has_inheritance = 1