private static IBaseSet updateSet <T>(string value, int i, ref string newValue, ref char lastOperand, IBaseSet set, IBase newValuePrimitive) where T : IBaseSet, new() { char currentCharacter = value[i]; if (newValuePrimitive != null) { if (set == null) { set = new T(); set = set.Factory(newValuePrimitive); } else { set.AppendItemToGroup(lastOperand, newValuePrimitive); } updateOperand(value, i, out lastOperand); newValue = string.Empty; } else if (Query.IsSumDifference(value, i) || Query.IsProductQuotient(value, i)) { lastOperand = currentCharacter; } else if (!char.IsWhiteSpace(currentCharacter)) { newValue += currentCharacter; } return(set); }
protected static T simplifyNumeric <T>(IBaseSet set) where T : IBaseSet, new() { if (!set.IsNumber()) { return((T)set); } IBase newValuePrimitive = new PrimitiveUnit(set.Calculate()); set = new T(); set = set.Factory(newValuePrimitive); return((T)set); }
public VirtualSet(IBaseSet innerSet, string alias, IEnumerable <IColumn> columns) { Select = columns; From = innerSet; Alias = alias; }
public VirtualSet(IBaseSet innerSet, string alias) { From = innerSet; Alias = alias; }
public Join(IBaseSet set, string alias, JoinType type) { Set = set; Alias = alias; Type = type; }