Example #1
0
        protected override void Init()
        {
            PartitionViewTable = new PartitionViewTable(this);

            if (Partitions.Count == 0 && !(this is CalculatedTable))
            {
                // Make sure the table contains at least one partition (Calculated Tables handles this on their own):

                if (Model.DataSources.Any(ds => ds.Type == DataSourceType.Structured))
                {
                    MPartition.CreateNew(this, Name);
                }
                else
                {
                    Partition.CreateNew(this, Name);
                }
            }

            RowLevelSecurity = new TableRLSIndexer(this);

            if (Handler.CompatibilityLevel >= 1400)
            {
                ObjectLevelSecurity = new TableOLSIndexer(this);
            }

            CheckChildrenErrors();

            base.Init();
        }
Example #2
0
        protected override void Init()
        {
            PartitionViewTable = new PartitionViewTable(this);

            if (Partitions.Count == 0 && !(this is CalculatedTable))
            {
                // Make sure the table contains at least one partition (Calculated Tables handles this on their own):
                Partition.CreateNew(this, Name);
            }

            RowLevelSecurity = new TableRLSIndexer(this);

            if (Handler.CompatibilityLevel >= 1400)
            {
                ObjectLevelSecurity = new TableOLSIndexer(this);
            }

            CheckChildrenErrors();

            base.Init();
        }