예제 #1
0
 public VpaSummaryViewModel(VertiPaqAnalyzerViewModel parent)
 {
     ParentViewModel    = parent;
     TableCount         = parent.ViewModel.Tables.Count();
     ColumnCount        = parent.ViewModel.Columns.Count();
     CompatibilityLevel = parent.ViewModel.Model.CompatibilityLevel;
     TotalSize          = parent.ViewModel.Tables.Sum(t => t.TableSize);
     DataSource         = parent.ViewModel.Model.ServerName?.Name ?? "<Unknown>";
     ModelName          = parent.ViewModel.Model.ModelName.Name;
     LastDataRefresh    = parent.ViewModel.Model.LastDataRefresh;
     ExtractionDate     = parent.ViewModel.Model.ExtractionDate;
 }
예제 #2
0
 public VpaTableViewModel(VpaTable table, VertiPaqAnalyzerViewModel parentViewModel)
 {
     _table                = table;
     _parentViewModel      = parentViewModel;
     Columns               = _table.Columns.Select(c => new VpaColumnViewModel(c, this));
     ColumnMaxTotalSize    = Columns.Max(c => c.TotalSize);
     ColumnsMaxCardinality = Columns.Max(c => c.ColumnCardinality);
     RelationshipsFrom     = _table.RelationshipsFrom.Select(r => new VpaRelationshipViewModel(r, this));
     if (RelationshipsFrom.Count() > 0)
     {
         RelationshipMaxFromCardinality = RelationshipsFrom.Max(r => r.FromColumnCardinality);
         RelationshipMaxToCardinality   = RelationshipsFrom.Max(r => r.ToColumnCardinality);
     }
 }
예제 #3
0
 public VpaTableViewModel(VpaTable table, VertiPaqAnalyzerViewModel parentViewModel, VpaSort sort)
 {
     _table           = table;
     _parentViewModel = parentViewModel;
     Columns          = _table.Columns.Select(c => new VpaColumnViewModel(c, this));
     if (Columns.Count() > 0)
     {
         ColumnMaxTotalSize    = Columns.Max(c => c.TotalSize);
         ColumnsMaxCardinality = Columns.Max(c => c.ColumnCardinality);
     }
     RelationshipsFrom = _table.RelationshipsFrom.Select(r => new VpaRelationshipViewModel(r, this));
     if (RelationshipsFrom.Count() > 0)
     {
         RelationshipMaxFromCardinality = RelationshipsFrom.Max(r => r.FromColumnCardinality);
         RelationshipMaxToCardinality   = RelationshipsFrom.Max(r => r.ToColumnCardinality);
         RelationshipFromMissingKeys    = RelationshipsFrom.Sum(r => r.MissingKeys);
         RelationshipInvalidRows        = RelationshipsFrom.Sum(r => r.InvalidRows);
     }
     _sort = sort;
 }
예제 #4
0
 public VpaPartitionViewModel(VpaPartition partition, VpaTableViewModel table, VertiPaqAnalyzerViewModel parentViewModel)
 {
     _partition       = partition;
     _parentViewModel = parentViewModel;
     Table            = table;
 }