Properties Inheritance
Object references and column references are used to inherit Properties along these references.
The type of property inheritance is determined by the config.InheritanceType.InheritanceType:
InheritanceType | InheritanceTypeDescription |
---|---|
0 |
No inheritance from predecessor |
11 |
Inheritance from first (or all) predecessor, if current value is NULL |
12 |
Inheritance from first (or all) predecessor, if current value is NULL or empty ('') |
13 |
Inheritance from first (or all) predecessor, forced, only when source is not empty |
14 |
Inheritance from first (or all) predecessor, forced without exception (dangerous!) |
Global InheritanceType are defined in config.Parameter - U
Select
Parameter_name
, sub_Parameter
, Parameter_desciption
, Parameter_default_value
, Parameter_value
, Parameter_value__result_nvarchar
, Parameter_value__result_int
From
config.Parameter
Where
Parameter_name Like 'Inheritance%'
Order By
Parameter_name
, sub_Parameter;
sub_parameter
corresponds to the property_name
. If a value has been defined for a property_name
, then this value applies, otherwise the value with sub_Parameter = ''
applies.
- Inheritance_StringAggSeparatorSql_column
-
if NULL then only one source is used for inheritance; if not NULL then STRING_AGG( expression, separator ) is used to aggregate all sources. Content is interpreted as TSQL. Good values are 'CHAR(13)+CHAR(10)' or '';''
- Inheritance_StringAggSeparatorSql_object
-
if NULL then only one source is used for inheritance; if not NULL then STRING_AGG( expression, separator ) is used to aggregate all sources. Content is interpreted as TSQL. Good values are 'CHAR(13)+CHAR(10)' or '';''
- InheritanceDefinition_column
-
CONCAT arguments to be used with some specific values in [config].[InheritanceType], for example: '[RepoObject_name],CHAR(13),CHAR(10),EineNochZuDefinierendeFunktion('MS_Description')'
- InheritanceDefinition_object
-
CONCAT arguments to be used with some specific values in [config].[InheritanceType], for example: '[RepoObject_name],CHAR(13),CHAR(10),EineNochZuDefinierendeFunktion('MS_Description')'
- InheritanceType_column
-
TINYINT; InheritanceType for column: possible values in [config].[InheritanceType]
- InheritanceType_object
-
TINYINT; InheritanceType for object: possible values in [config].[InheritanceType]
-
sub_Parameter =
ReferencedObjectList
-
Parameter_name =
Inheritance_StringAggSeparatorSql_object
-
resulting value =
CHAR(13)+CHAR(10)
-
The value is not NULL. (the value is not so good visible in the screenshot, it looks like an empty string):
STRING_AGG( expression, CHAR(13)+CHAR(10) )
is used to aggregate all sources
-
-
Parameter_name =
InheritanceDefinition_object
-
resulting value =
'* ' + referenced.[RepoObject_fullname]
-
the expression for STRING_AGG is defined
STRING_AGG( '* ' + referenced.[RepoObject_fullname], CHAR(13)+CHAR(10) )
is used to aggregate all sources.
in other words: all referenced objects are used to create a list containing one referenced objects per line
-
-
Parameter_name =
InheritanceType_object
-
resulting value =
14
-
The value (the list of referenced objects) will be recalculated every time
-
-
-
sub_Parameter =
MS_Description
-
Parameter_name =
InheritanceDefinition_column
-
resulting value =
CAST(COALESCE(referencing.[Repo_definition], property.fs_get_RepoObjectColumnProperty_nvarchar(referenced.[RepoObjectColumn_guid], 'MS_Description')) AS NVARCHAR(4000))
-
if the current column (referencing) has any value in
[Repo_definition]
, then this value is used.[Repo_definition]
normally contains the calculation of a calculated column.
Otherwise, the value of the 'MS_Description' property is inherited from the first referenced column.
only the first referenced column is used, because the default value forInheritance_StringAggSeparatorSql_column
isNULL
.
In other words: "Use the calculation’s definition of the current column, if it is a calculation, otherwise inherit the description from the first referenced column."
-
-
Parameter_name =
InheritanceType_column
-
resulting value =
12
-
The property will only be calculated, if current value is NULL or empty ('')
-
-
for ('InheritanceType_column', 'MS_Description') Set Parameter_value = 12 , to enable inheritance for column descriptions.
|
It is possible to overwrite inheritance instructions for individual objects or columns, using:
The inheritance is done with these procedures
They are called by repo.usp_main - P