Exemplo n.º 1
0
        private string OperatorStr(FieldMathOperator op)
        {
            switch (op)
            {
            case FieldMathOperator.Plus:
                return("+");

            case FieldMathOperator.Minus:
                return("-");

            case FieldMathOperator.Multiply:
                return("*");

            case FieldMathOperator.Divide:
                return("/");

            case FieldMathOperator.Equal:
                return("=");

            case FieldMathOperator.GreaterThan:
                return(">");

            case FieldMathOperator.LessThan:
                return("<");

            case FieldMathOperator.GreaterEqualThan:
                return(">=");

            case FieldMathOperator.LessEqualThan:
                return("<=");

            case FieldMathOperator.Or:
                return("OR");

            case FieldMathOperator.And:
                return("AND");
            }
            throw new NotImplementedException();
        }
Exemplo n.º 2
0
 public SqlMathExpression(FieldType type, SqlExpression left, FieldMathOperator op, SqlExpression right) : base(type)
 {
     Left  = left;
     Right = right;
     Op    = op;
 }