internal ErrorLog GenerateAllBidirectionalViews( KeyToListMap <EntitySetBase, GeneratedView> views, CqlIdentifiers identifiers) { if (this.m_config.IsNormalTracing) { StringBuilder builder = new StringBuilder(); Cell.CellsToBuilder(builder, (IEnumerable <Cell>) this.m_cellGroup); Helpers.StringTraceLine(builder.ToString()); } this.m_config.SetTimeForFinishedActivity(PerfType.CellCreation); ErrorLog errorLog = new CellGroupValidator((IEnumerable <Cell>) this.m_cellGroup, this.m_config).Validate(); if (errorLog.Count > 0) { errorLog.PrintTrace(); return(errorLog); } this.m_config.SetTimeForFinishedActivity(PerfType.KeyConstraint); if (this.m_config.GenerateUpdateViews) { errorLog = this.GenerateDirectionalViews(ViewTarget.UpdateView, identifiers, views); if (errorLog.Count > 0) { return(errorLog); } } if (this.m_config.IsValidationEnabled) { this.CheckForeignKeyConstraints(errorLog); } this.m_config.SetTimeForFinishedActivity(PerfType.ForeignConstraint); if (errorLog.Count > 0) { errorLog.PrintTrace(); return(errorLog); } this.m_updateDomainMap.ExpandDomainsToIncludeAllPossibleValues(); return(this.GenerateDirectionalViews(ViewTarget.QueryView, identifiers, views)); }
internal ErrorLog GenerateQueryViewForSingleExtent( KeyToListMap <EntitySetBase, GeneratedView> views, CqlIdentifiers identifiers, EntitySetBase entity, EntityTypeBase type, ViewGenMode mode) { if (this.m_config.IsNormalTracing) { StringBuilder builder = new StringBuilder(); Cell.CellsToBuilder(builder, (IEnumerable <Cell>) this.m_cellGroup); Helpers.StringTraceLine(builder.ToString()); } ErrorLog errorLog = new CellGroupValidator((IEnumerable <Cell>) this.m_cellGroup, this.m_config).Validate(); if (errorLog.Count > 0) { errorLog.PrintTrace(); return(errorLog); } if (this.m_config.IsValidationEnabled) { this.CheckForeignKeyConstraints(errorLog); } if (errorLog.Count > 0) { errorLog.PrintTrace(); return(errorLog); } this.m_updateDomainMap.ExpandDomainsToIncludeAllPossibleValues(); foreach (Cell cell in this.m_cellGroup) { cell.SQuery.WhereClause.FixDomainMap(this.m_updateDomainMap); } return(this.GenerateQueryViewForExtentAndType(identifiers, views, entity, type, mode)); }