private Operation.Grouping.IMergeAlgorithm BuildOrGetMergeAlgo(ViewColumn vc, Type columnValueType, Database.MetaColumn metaColumn) { Operation.Grouping.IMergeAlgorithm mergeAlgo = null; if (mergeAlgoE != Operation.Grouping.MergeAlgo.none) { mergeAlgo = Operation.Grouping.GetMergeAlgo(mergeAlgoE, columnValueType); if (metaColumn != null) { metaColumn.DefaultMergeAlgorithm = mergeAlgo; } } else { if (metaColumn != null) { mergeAlgo = metaColumn.DefaultMergeAlgorithm; } } if (vc != null && mergeAlgo != null && mergeAlgo.IsDisplayMergedRowsOnly()) { vc.m_IsDisplayMergedOnly = true; } return(mergeAlgo); }
void ViewColumn.IViewColumn.SetColumn(ViewColumn vc, Database.Column col) { if (this.vc != null) { throw new InvalidOperationException("Cannot call 'ViewColumn.IViewColumn.SetColumn' once already set"); } this.vc = vc; }
public IViewColumn Build(ViewTable.Builder.Node node, ViewSchema vs, Database.Schema baseSchema, ViewTable vTable, Operation.ExpressionParsingContext expressionParsingContext, ref Database.MetaColumn metaColumn) { // Check if we have a type mismatch Type columnValueType = metaColumn != null ? metaColumn.Type : null; if (value.type != null) { if (columnValueType != null && columnValueType != value.type) { DebugUtility.LogWarning("While building column '" + name + "' : " + "Cannot override type from '" + columnValueType.Name + "' to '" + value.type.Name + "'"); } columnValueType = value.type; } // Parse expression value Operation.Expression.ParseIdentifierOption parseOpt = new Operation.Expression.ParseIdentifierOption(vs, vTable, true, false, columnValueType, expressionParsingContext); parseOpt.formatError = (string s, Operation.Expression.ParseIdentifierOption opt) => { return(FormatErrorContextInfo(vs, vTable) + " : " + s); }; Operation.Expression expression = Operation.Expression.ParseIdentifier(value, parseOpt); // Build declaration with the type we've just parsed BuildOrUpdateDeclaration(ref metaColumn, expression.type); IViewColumn result = (IViewColumn)Operation.ColumnCreator.CreateViewColumnExpression(expression); ViewColumn vc = new ViewColumn(); vc.m_MetaLink = m_MetaLink; vc.viewTable = vTable; vc.ParsingContext = expressionParsingContext; result.SetColumn(vc, null); return(result); }
void ViewColumn.IViewColumn.SetColumn(ViewColumn vc, Database.Column col) { m_SourceViewColumn = vc; UpdateCache(); }
public ViewColumRowIndex(ViewColumn vc) { this.vc = vc; type = typeof(long); }
void ViewColumn.IViewColumn.SetColumn(ViewColumn vc, Column col) { this.vc = vc; }
void ViewColumn.IViewColumn.SetColumn(ViewColumn vc, Database.Column col) { this.vc = vc; column = (Database.ColumnTyped <DataT>)col; m_rowIndex = null; }
public ViewColumnConst(ViewColumn vc, DataT v) { this.vc = vc; value = v; }