repo.RepoObject_persistence_ObjectNames - V

type: V ( view ), modify_date: 2022-01-05 17:04:09

RepoObject_guid: 0590291C-9D61-EB11-84DC-A81E8446D5B0

Description

Examples

Entity Diagram

entity-repo.repoobject_persistence_objectnames

Columns

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

bit

NOT NULL

bit

NOT NULL

nvarchar(128)

NULL

nvarchar(128)

NULL

bit

NULL

bit

NOT NULL

bit

NOT NULL

bit

NOT NULL

bit

NOT NULL

bit

NOT NULL

bit

NOT NULL

bit

NULL

nvarchar(128)

NOT NULL

nvarchar(128)

NOT NULL

char(2)

NOT NULL

uniqueidentifier

NULL

nvarchar(128)

NULL

nvarchar(128)

NULL

char(2)

NULL

uniqueidentifier

NOT NULL

Foreign Key Diagram

entity_1_1_fk-repo.repoobject_persistence_objectnames

References

Object Reference Diagram - 1 1

entity_1_1_objectref-repo.repoobject_persistence_objectnames

Object Reference Diagram - Referenced - 30 0

entity_30_0_objectref-repo.repoobject_persistence_objectnames

Object Reference Diagram - Referencing - 0 30

entity_0_30_objectref-repo.repoobject_persistence_objectnames

Column Reference Diagram

entity_1_1_colref-repo.repoobject_persistence_objectnames

Indexes

idx_RepoObject_persistence_ObjectNames__1

idx_RepoObject_persistence_ObjectNames__2

idx_RepoObject_persistence_ObjectNames__3

Column Details

_

has_history

has_history

bit

NOT NULL

has_history_columns

has_history_columns

bit

NOT NULL

history_schema_name

history_schema_name

nvarchar(128)

NULL

history_table_name

history_table_name

nvarchar(128)

NULL

is_persistence

is_persistence

bit

NULL

is_persistence_check_for_empty_source

is_persistence_check_for_empty_source

bit

NOT NULL

is_persistence_delete_changed

is_persistence_delete_changed

bit

NOT NULL

is_persistence_delete_missing

is_persistence_delete_missing

bit

NOT NULL

is_persistence_insert

is_persistence_insert

bit

NOT NULL

is_persistence_truncate

is_persistence_truncate

bit

NOT NULL

is_persistence_update_changed

is_persistence_update_changed

bit

NOT NULL

is_repo_managed_t

is_repo_managed_t

bit

NULL

Referenced Columns

RepoObject_name_t

RepoObject_name_t

nvarchar(128)

NOT NULL

Referenced Columns

RepoObject_schema_name_t

RepoObject_schema_name_t

nvarchar(128)

NOT NULL

RepoObject_type_t

RepoObject_type_t

char(2)

NOT NULL

Referenced Columns

source_RepoObject_guid

source_RepoObject_guid

uniqueidentifier

NULL

SysObject_name_s

SysObject_name_s

nvarchar(128)

NULL

Referenced Columns

SysObject_schema_name_s

SysObject_schema_name_s

nvarchar(128)

NULL

SysObject_type_s

SysObject_type_s

char(2)

NULL

Referenced Columns

target_RepoObject_guid

target_RepoObject_guid

uniqueidentifier

NOT NULL

sql_modules_definition

repo.RepoObject_persistence_ObjectNames - V script
/*
Source - Sys names will be used
to create
Target - Repo names (because a persistence is per definition defined as

if ro_s columns are empty, then the entry in [rop].[source_RepoObject_guid] is wrong and should be corrected or the entry should be deleted

SELECT
       *
FROM
     repo.RepoObject_persistence_ObjectNames AS T1
WHERE  [T1].[SysObject_name_s] IS NULL

*/
CREATE View repo.RepoObject_persistence_ObjectNames
As
--
Select
    rop.target_RepoObject_guid
  , rop.source_RepoObject_guid
  , SysObject_schema_name_s  = ro_s.SysObject_schema_name
  , SysObject_name_s         = ro_s.SysObject_name
  , SysObject_type_s         = ro_s.SysObject_type
  , RepoObject_schema_name_t = ro_t.RepoObject_schema_name
  , RepoObject_name_t        = ro_t.RepoObject_name
  , RepoObject_type_t        = ro_t.RepoObject_type
  , is_repo_managed_t        = ro_t.is_repo_managed
  , rop.is_persistence_truncate
  , rop.is_persistence_delete_missing
  , rop.is_persistence_delete_changed
  , rop.is_persistence_update_changed
  , rop.is_persistence_insert
  , rop.has_history
  , rop.has_history_columns
  , rop.is_persistence_check_for_empty_source
  , rop.history_schema_name
  , rop.history_table_name
  , rop.is_persistence
From
    repo.RepoObject_persistence As rop
    Inner Join
        repo.RepoObject         As ro_t
            On
            rop.target_RepoObject_guid = ro_t.RepoObject_guid

    Left Outer Join
        repo.RepoObject         As ro_s
            On
            rop.source_RepoObject_guid = ro_s.RepoObject_guid