20 using NUnit.Framework;
22 namespace Deveel.Data.Sql.Expressions {
27 const string s =
"6578 + 76.32";
31 Assert.IsNotNull(sqlExp);
38 Assert.IsTrue(binExp.CanEvaluate);
43 const string s =
"642.221 - 116.32";
47 Assert.IsNotNull(sqlExp);
54 Assert.IsTrue(binExp.CanEvaluate);
59 const string s =
"75664 + 907 * 87";
63 Assert.IsNotNull(sqlExp);
70 Assert.IsTrue(binExp.CanEvaluate);
73 Assert.DoesNotThrow(() => evalExp = binExp.
Evaluate());
74 Assert.IsNotNull(evalExp);
78 Assert.IsInstanceOf<
SqlNumber>(value.Value);
79 Assert.AreEqual(154573, ((
SqlNumber)value.Value).ToInt32());
void ChainedAddAndMultipleNumeric()
static SqlExpression Parse(string s)
Parses the given SQL string to an expression that can be evaluated.
SqlExpressionType
All the possible type of SqlExpression supported
DataObject Value
Gets the constant value of the expression.
virtual SqlExpression Evaluate(EvaluateContext context)
When overridden by a derived class, this method evaluates the expression within the provided context...
void SimpleNumericSubtract()
An expression that holds a constant value.
Defines the base class for instances that represent SQL expression tree nodes.
abstract SqlExpressionType ExpressionType
Gets the type code of this SQL expression.