public static void Set(this ITableCellCache cache, string database, int tableId, int rowNumber, int columnOffset, Field value) { var rowId = new RowId(tableId, rowNumber); var key = new CellKey(database, new CellId(rowId, columnOffset)); cache.Set(new CachedCell(key, value)); }
private Field CalcValue(int row, int column, ITableCellCache cache) { var resolver = varResolver.ForRow(row); if (groupResolver != null) { groupResolver.SetUpGroupForRow(row); } var expr = expList[column]; var exp = expr.Evaluate(context, resolver, groupResolver); if (exp.ExpressionType != SqlExpressionType.Constant) { throw new ArgumentException(); } var value = ((SqlConstantExpression)exp).Value; if (cache != null) { cache.Set(context.Query.Session.Transaction.Database.Name, uniqueId, row, column, value); } return(value); }
private DataObject CalcValue(int row, int column, ITableCellCache cache) { var resolver = varResolver.ForRow(row); if (groupResolver != null) { groupResolver.SetUpGroupForRow(row); } var expr = expList[column]; var exp = expr.Evaluate(context, resolver, groupResolver); if (exp.ExpressionType != SqlExpressionType.Constant) throw new ArgumentException(); var value = ((SqlConstantExpression) exp).Value; if (cache != null) cache.Set(context.Query.Session.Transaction.Database.Name, uniqueId, row, column, value); return value; }