Ejemplo n.º 1
0
        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);
        }
Ejemplo n.º 2
0
        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);
        }
Ejemplo n.º 3
0
 public VirtualSet(IBaseSet innerSet, string alias, IEnumerable <IColumn> columns)
 {
     Select = columns;
     From   = innerSet;
     Alias  = alias;
 }
Ejemplo n.º 4
0
 public VirtualSet(IBaseSet innerSet, string alias)
 {
     From  = innerSet;
     Alias = alias;
 }
Ejemplo n.º 5
0
 public Join(IBaseSet set, string alias, JoinType type)
 {
     Set   = set;
     Alias = alias;
     Type  = type;
 }