DeveelDB  20151217
complete SQL database system, primarly developed for .NET/Mono frameworks
SqlBinaryExpressionTests.cs
Go to the documentation of this file.
1 //
2 // Copyright 2010-2014 Deveel
3 //
4 // Licensed under the Apache License, Version 2.0 (the "License");
5 // you may not use this file except in compliance with the License.
6 // You may obtain a copy of the License at
7 //
8 // http://www.apache.org/licenses/LICENSE-2.0
9 //
10 // Unless required by applicable law or agreed to in writing, software
11 // distributed under the License is distributed on an "AS IS" BASIS,
12 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 // See the License for the specific language governing permissions and
14 // limitations under the License.
15 
16 using System;
17 
18 using Deveel.Data.Sql.Objects;
19 using Deveel.Data.Types;
20 
21 using NUnit.Framework;
22 
23 namespace Deveel.Data.Sql.Expressions {
24  [TestFixture]
25  public sealed class SqlBinaryExpressionTests {
26  [Test]
27  public void NumericAndNumericAdd() {
28  var exp1 = SqlExpression.Constant(DataObject.Number(new SqlNumber(4566, 10)));
29  var exp2 = SqlExpression.Constant(DataObject.Number(new SqlNumber(8991.67, 10)));
30  var addExp = SqlExpression.Add(exp1, exp2);
31 
32  SqlExpression resultExp = null;
33  Assert.DoesNotThrow(() => resultExp = addExp.Evaluate());
34  Assert.IsNotNull(resultExp);
35  Assert.IsInstanceOf<SqlConstantExpression>(resultExp);
36 
37  var constExp = (SqlConstantExpression) resultExp;
38  Assert.IsNotNull(constExp.Value.Value);
39  Assert.IsInstanceOf<NumericType>(constExp.Value.Type);
40  Assert.IsInstanceOf<SqlNumber>(constExp.Value.Value);
41 
42  var actual = ((SqlNumber) constExp.Value.Value).Round(2);
43  var expected = new SqlNumber(13557.67, 2);
44 
45  Assert.AreEqual(expected, actual);
46  }
47 
48  [Test]
49  public void NumericAddToString() {
50  var exp1 = SqlExpression.Constant(DataObject.Number(new SqlNumber(4566, 10)));
51  var exp2 = SqlExpression.Constant(DataObject.Number(new SqlNumber(8991.67, 10)));
52  var addExp = SqlExpression.Add(exp1, exp2);
53 
54  string s = null;
55  Assert.DoesNotThrow(() => s = addExp.ToString());
56  Assert.IsNotNull(s);
57  Assert.IsNotEmpty(s);
58  Assert.AreEqual("4566 + 8991.670000", s);
59  }
60 
61  [Test]
62  public void NumericAndBooleanAdd() {
63  var exp1 = SqlExpression.Constant(DataObject.Number(new SqlNumber(4566)));
64  var exp2 = SqlExpression.Constant(DataObject.Boolean(true));
65  var addExp = SqlExpression.Add(exp1, exp2);
66 
67  SqlExpression resultExp = null;
68  Assert.DoesNotThrow(() => resultExp = addExp.Evaluate());
69  Assert.IsNotNull(resultExp);
70  Assert.IsInstanceOf<SqlConstantExpression>(resultExp);
71 
72  var constExp = (SqlConstantExpression) resultExp;
73  Assert.IsNotNull(constExp.Value.Value);
74  Assert.IsInstanceOf<NumericType>(constExp.Value.Type);
75  Assert.IsInstanceOf<SqlNumber>(constExp.Value.Value);
76 
77  var actual = ((SqlNumber) constExp.Value.Value).Round(2);
78  var expected = new SqlNumber(4567, 2);
79  Assert.AreEqual(expected, actual);
80  }
81 
82  [Test]
83  public void StringAndStringAdd() {
84  var exp1 = SqlExpression.Constant(DataObject.String("The quick brown fox "));
85  var exp2 = SqlExpression.Constant(DataObject.VarChar("jumps over the lazy dog"));
86  var addExp = SqlExpression.Add(exp1, exp2);
87 
88  SqlExpression resultExp = null;
89  Assert.DoesNotThrow(() => resultExp = addExp.Evaluate());
90  Assert.IsNotNull(resultExp);
91  Assert.IsInstanceOf<SqlConstantExpression>(resultExp);
92 
93  var constExp = (SqlConstantExpression) resultExp;
94  Assert.IsNotNull(constExp.Value.Value);
95  Assert.IsInstanceOf<StringType>(constExp.Value.Type);
96  Assert.IsInstanceOf<SqlString>(constExp.Value.Value);
97  Assert.AreEqual(new SqlString("The quick brown fox jumps over the lazy dog"), (SqlString) constExp.Value.Value);
98  }
99 
100  [Test]
102  var exp1 = SqlExpression.Constant(DataObject.Number(new SqlNumber(879987.47, 10)));
103  var exp2 = SqlExpression.Constant(DataObject.Number(new SqlNumber(2577.14, 10)));
104  var subtractExp = SqlExpression.Subtract(exp1, exp2);
105 
106  SqlExpression resultExp = null;
107  Assert.DoesNotThrow(() => resultExp = subtractExp.Evaluate());
108  Assert.IsNotNull(resultExp);
109  Assert.IsInstanceOf<SqlConstantExpression>(resultExp);
110 
111  var constExp = (SqlConstantExpression)resultExp;
112  Assert.IsNotNull(constExp.Value.Value);
113  Assert.IsInstanceOf<NumericType>(constExp.Value.Type);
114  Assert.IsInstanceOf<SqlNumber>(constExp.Value.Value);
115 
116  var actual = ((SqlNumber) constExp.Value.Value).Round(2);
117  var expected = new SqlNumber(877410.33, 2);
118 
119  Assert.AreEqual(expected, actual);
120  }
121 
122  [Test]
124  var exp1 = SqlExpression.Constant(DataObject.Number(new SqlNumber(325778.32)));
125  var exp2 = SqlExpression.Constant(DataObject.Boolean(true));
126  var subtractExp = SqlExpression.Subtract(exp1, exp2);
127 
128  SqlExpression resultExp = null;
129  Assert.DoesNotThrow(() => resultExp = subtractExp.Evaluate());
130  Assert.IsNotNull(resultExp);
131  Assert.IsInstanceOf<SqlConstantExpression>(resultExp);
132 
133  var constExp = (SqlConstantExpression)resultExp;
134  Assert.IsNotNull(constExp.Value.Value);
135  Assert.IsInstanceOf<NumericType>(constExp.Value.Type);
136  Assert.IsInstanceOf<SqlNumber>(constExp.Value.Value);
137  Assert.AreEqual(new SqlNumber(325777.32), (SqlNumber)constExp.Value.Value);
138  }
139 
140  [Test]
141  public void NumericMultiply() {
142  var exp1 = SqlExpression.Constant(DataObject.Number(new SqlNumber(56894.09)));
143  var exp2 = SqlExpression.Constant(DataObject.Number(new SqlNumber(456)));
144  var mulExp = SqlExpression.Multiply(exp1, exp2);
145 
146  SqlExpression resultExp = null;
147  Assert.DoesNotThrow(() => resultExp = mulExp.Evaluate());
148  Assert.IsNotNull(resultExp);
149  Assert.IsInstanceOf<SqlConstantExpression>(resultExp);
150 
151  var constExp = (SqlConstantExpression)resultExp;
152  Assert.IsNotNull(constExp.Value.Value);
153  Assert.IsInstanceOf<NumericType>(constExp.Value.Type);
154  Assert.IsInstanceOf<SqlNumber>(constExp.Value.Value);
155 
156  var actual = ((SqlNumber) constExp.Value.Value).Round(2);
157  var expected = new SqlNumber(25943705.04, 2);
158  Assert.AreEqual(expected, actual);
159  }
160 
161  [Test]
162  public void NumericDivide() {
163  var exp1 = SqlExpression.Constant(DataObject.Number(new SqlNumber(49021.022)));
164  var exp2 = SqlExpression.Constant(DataObject.Number(new SqlNumber(78.34)));
165  var divExp = SqlExpression.Divide(exp1, exp2);
166 
167  SqlExpression resultExp = null;
168  Assert.DoesNotThrow(() => resultExp = divExp.Evaluate());
169  Assert.IsNotNull(resultExp);
170  Assert.IsInstanceOf<SqlConstantExpression>(resultExp);
171 
172  var constExp = (SqlConstantExpression)resultExp;
173  Assert.IsNotNull(constExp.Value.Value);
174  Assert.IsInstanceOf<NumericType>(constExp.Value.Type);
175  Assert.IsInstanceOf<SqlNumber>(constExp.Value.Value);
176 
177  var actual = ((SqlNumber)constExp.Value.Value).Round(5);
178  var expected = new SqlNumber(625.74702, 5);
179  Assert.AreEqual(expected, actual);
180  }
181 
182  [Test]
183  public void NumericModulo() {
184  var exp1 = SqlExpression.Constant(DataObject.Number(new SqlNumber(892771.0623)));
185  var exp2 = SqlExpression.Constant(DataObject.Number(new SqlNumber(9012)));
186  var modExp = SqlExpression.Modulo(exp1, exp2);
187 
188  SqlExpression resultExp = null;
189  Assert.DoesNotThrow(() => resultExp = modExp.Evaluate());
190  Assert.IsNotNull(resultExp);
191  Assert.IsInstanceOf<SqlConstantExpression>(resultExp);
192 
193  var constExp = (SqlConstantExpression)resultExp;
194  Assert.IsNotNull(constExp.Value.Value);
195  Assert.IsInstanceOf<NumericType>(constExp.Value.Type);
196  Assert.IsInstanceOf<SqlNumber>(constExp.Value.Value);
197 
198  var actual = ((SqlNumber)constExp.Value.Value).Round(4);
199  var expected = new SqlNumber(583.0623, 4);
200  Assert.AreEqual(expected, actual);
201  }
202 
203  [TestCase(9862711.650091, 9862711.650091, true)]
204  [TestCase(12345, 2345, false)]
205  [TestCase(123456.789, 123456.7, false)]
206  public void NumericEqualTo(double a, double b, bool expected) {
207  var exp1 = SqlExpression.Constant(DataObject.Number(new SqlNumber(a)));
208  var exp2 = SqlExpression.Constant(DataObject.Number(new SqlNumber(b)));
209  var eqExp = SqlExpression.Equal(exp1, exp2);
210 
211  SqlExpression resultExp = null;
212  Assert.DoesNotThrow(() => resultExp = eqExp.Evaluate());
213  Assert.IsNotNull(resultExp);
214  Assert.IsInstanceOf<SqlConstantExpression>(resultExp);
215 
216  var constExp = (SqlConstantExpression)resultExp;
217  Assert.IsNotNull(constExp.Value.Value);
218  Assert.IsInstanceOf<BooleanType>(constExp.Value.Type);
219  Assert.IsInstanceOf<SqlBoolean>(constExp.Value.Value);
220 
221  var actual = ((SqlBoolean)constExp.Value.Value);
222  var expectedResult = (SqlBoolean) expected;
223  Assert.AreEqual(expectedResult, actual);
224  }
225 
226  [TestCase(763525.22e11, 763525.22e11, false)]
227  [TestCase(12345, 123456, true)]
228  [TestCase(564255.23899, 564255.23, true)]
229  public void NumericNotEqualTo(double a, double b, bool expected) {
230  var exp1 = SqlExpression.Constant(DataObject.Number(new SqlNumber(a)));
231  var exp2 = SqlExpression.Constant(DataObject.Number(new SqlNumber(b)));
232  var eqExp = SqlExpression.NotEqual(exp1, exp2);
233 
234  SqlExpression resultExp = null;
235  Assert.DoesNotThrow(() => resultExp = eqExp.Evaluate());
236  Assert.IsNotNull(resultExp);
237  Assert.IsInstanceOf<SqlConstantExpression>(resultExp);
238 
239  var constExp = (SqlConstantExpression)resultExp;
240  Assert.IsNotNull(constExp.Value.Value);
241  Assert.IsInstanceOf<BooleanType>(constExp.Value.Type);
242  Assert.IsInstanceOf<SqlBoolean>(constExp.Value.Value);
243 
244  var actual = ((SqlBoolean)constExp.Value.Value);
245  var expectedResult = (SqlBoolean)expected;
246  Assert.AreEqual(expectedResult, actual);
247  }
248 
249  [TestCase(123998, 123999, false)]
250  [TestCase(8764556.9011, 8764556.901145, false)]
251  [TestCase(244591, 24620, true)]
252  public void NumericGreaterThan(double a, double b, bool expected) {
253  var exp1 = SqlExpression.Constant(DataObject.Number(new SqlNumber(a)));
254  var exp2 = SqlExpression.Constant(DataObject.Number(new SqlNumber(b)));
255  var grExp = SqlExpression.GreaterThan(exp1, exp2);
256 
257  SqlExpression resultExp = null;
258  Assert.DoesNotThrow(() => resultExp = grExp.Evaluate());
259  Assert.IsNotNull(resultExp);
260  Assert.IsInstanceOf<SqlConstantExpression>(resultExp);
261 
262  var constExp = (SqlConstantExpression)resultExp;
263  Assert.IsNotNull(constExp.Value.Value);
264  Assert.IsInstanceOf<BooleanType>(constExp.Value.Type);
265  Assert.IsInstanceOf<SqlBoolean>(constExp.Value.Value);
266 
267  var actual = ((SqlBoolean)constExp.Value.Value);
268  var expectedResult = (SqlBoolean)expected;
269  Assert.AreEqual(expectedResult, actual);
270  }
271 
272  [TestCase(988271, 988271, false)]
273  [TestCase(625.99e23, 12, false)]
274  [TestCase(19283.9991e68, 19283.9991e69, true)]
275  public void NumericSmallerThan(double a, double b, bool expected) {
276  var exp1 = SqlExpression.Constant(DataObject.Number(new SqlNumber(a)));
277  var exp2 = SqlExpression.Constant(DataObject.Number(new SqlNumber(b)));
278  var ltExp = SqlExpression.SmallerThan(exp1, exp2);
279 
280  SqlExpression resultExp = null;
281  Assert.DoesNotThrow(() => resultExp = ltExp.Evaluate());
282  Assert.IsNotNull(resultExp);
283  Assert.IsInstanceOf<SqlConstantExpression>(resultExp);
284 
285  var constExp = (SqlConstantExpression)resultExp;
286  Assert.IsNotNull(constExp.Value.Value);
287  Assert.IsInstanceOf<BooleanType>(constExp.Value.Type);
288  Assert.IsInstanceOf<SqlBoolean>(constExp.Value.Value);
289 
290  var actual = ((SqlBoolean)constExp.Value.Value);
291  var expectedResult = (SqlBoolean)expected;
292  Assert.AreEqual(expectedResult, actual);
293  }
294 
295  [TestCase(458849, 5526, 464375)]
296  public void NumericOr(long a, long b, long expected) {
297  var exp1 = SqlExpression.Constant(DataObject.Number(new SqlNumber(a)));
298  var exp2 = SqlExpression.Constant(DataObject.Number(new SqlNumber(b)));
299  var orExp = SqlExpression.Or(exp1, exp2);
300 
301  SqlExpression resultExp = null;
302  Assert.DoesNotThrow(() => resultExp = orExp.Evaluate());
303  Assert.IsNotNull(resultExp);
304  Assert.IsInstanceOf<SqlConstantExpression>(resultExp);
305 
306  var constExp = (SqlConstantExpression)resultExp;
307  Assert.IsNotNull(constExp.Value.Value);
308  Assert.IsInstanceOf<NumericType>(constExp.Value.Type);
309  Assert.IsInstanceOf<SqlNumber>(constExp.Value.Value);
310 
311  var actual = ((SqlNumber)constExp.Value.Value);
312  var expectedResult = new SqlNumber(expected);
313  Assert.AreEqual(expectedResult, actual);
314  }
315 
316  [TestCase(true, true, true)]
317  [TestCase(true, false, true)]
318  [TestCase(false, false, false)]
319  public void BooleanOr(bool a, bool b, bool expected) {
320  var exp1 = SqlExpression.Constant(DataObject.Boolean(new SqlBoolean(a)));
321  var exp2 = SqlExpression.Constant(DataObject.Boolean(new SqlBoolean(b)));
322  var orExp = SqlExpression.Or(exp1, exp2);
323 
324  SqlExpression resultExp = null;
325  Assert.DoesNotThrow(() => resultExp = orExp.Evaluate());
326  Assert.IsNotNull(resultExp);
327  Assert.IsInstanceOf<SqlConstantExpression>(resultExp);
328 
329  var constExp = (SqlConstantExpression)resultExp;
330  Assert.IsNotNull(constExp.Value.Value);
331  Assert.IsInstanceOf<BooleanType>(constExp.Value.Type);
332  Assert.IsInstanceOf<SqlBoolean>(constExp.Value.Value);
333 
334  var actual = ((SqlBoolean)constExp.Value.Value);
335  var expectedResult = new SqlBoolean(expected);
336  Assert.AreEqual(expectedResult, actual);
337  }
338 
339 
340  [TestCase(true, true, true)]
341  [TestCase(true, false, false)]
342  [TestCase(false, false, false)]
343  public void BooleanAnd(bool a, bool b, bool expected) {
344  var exp1 = SqlExpression.Constant(DataObject.Boolean(new SqlBoolean(a)));
345  var exp2 = SqlExpression.Constant(DataObject.Boolean(new SqlBoolean(b)));
346  var andExp = SqlExpression.And(exp1, exp2);
347 
348  SqlExpression resultExp = null;
349  Assert.DoesNotThrow(() => resultExp = andExp.Evaluate());
350  Assert.IsNotNull(resultExp);
351  Assert.IsInstanceOf<SqlConstantExpression>(resultExp);
352 
353  var constExp = (SqlConstantExpression)resultExp;
354  Assert.IsNotNull(constExp.Value.Value);
355  Assert.IsInstanceOf<BooleanType>(constExp.Value.Type);
356  Assert.IsInstanceOf<SqlBoolean>(constExp.Value.Value);
357 
358  var actual = ((SqlBoolean)constExp.Value.Value);
359  var expectedResult = new SqlBoolean(expected);
360  Assert.AreEqual(expectedResult, actual);
361  }
362 
363 
364  [TestCase(567488, 90021, 653157)]
365  public void NumericXOr(double a, double b, double expected) {
366  var exp1 = SqlExpression.Constant(DataObject.Double(a));
367  var exp2 = SqlExpression.Constant(DataObject.Double(b));
368  var xorExp = SqlExpression.XOr(exp1, exp2);
369 
370  SqlExpression resultExp = null;
371  Assert.DoesNotThrow(() => resultExp = xorExp.Evaluate());
372  Assert.IsNotNull(resultExp);
373  Assert.IsInstanceOf<SqlConstantExpression>(resultExp);
374 
375  var constExp = (SqlConstantExpression)resultExp;
376  Assert.IsNotNull(constExp.Value.Value);
377  Assert.IsInstanceOf<NumericType>(constExp.Value.Type);
378  Assert.IsInstanceOf<SqlNumber>(constExp.Value.Value);
379 
380  var actual = ((SqlNumber)constExp.Value.Value);
381  var expectedResult = new SqlNumber(expected);
382  Assert.AreEqual(expectedResult, actual);
383  }
384 
385  [TestCase(6574493, 13324, 4108)]
386  public void NumericAnd(long a, long b, long expected) {
387  var exp1 = SqlExpression.Constant(DataObject.Number(new SqlNumber(a)));
388  var exp2 = SqlExpression.Constant(DataObject.Number(new SqlNumber(b)));
389  var orExp = SqlExpression.And(exp1, exp2);
390 
391  SqlExpression resultExp = null;
392  Assert.DoesNotThrow(() => resultExp = orExp.Evaluate());
393  Assert.IsNotNull(resultExp);
394  Assert.IsInstanceOf<SqlConstantExpression>(resultExp);
395 
396  var constExp = (SqlConstantExpression)resultExp;
397  Assert.IsNotNull(constExp.Value.Value);
398  Assert.IsInstanceOf<NumericType>(constExp.Value.Type);
399  Assert.IsInstanceOf<SqlNumber>(constExp.Value.Value);
400 
401  var actual = ((SqlNumber)constExp.Value.Value);
402  var expectedResult = new SqlNumber(expected);
403  Assert.AreEqual(expectedResult, actual);
404  }
405 
406  [Test]
407  public void NumericIsNullTrue() {
409  var exp2 = SqlExpression.Constant(DataObject.Null());
410  var orExp = SqlExpression.Is(exp1, exp2);
411 
412  SqlExpression resultExp = null;
413  Assert.DoesNotThrow(() => resultExp = orExp.Evaluate());
414  Assert.IsNotNull(resultExp);
415  Assert.IsInstanceOf<SqlConstantExpression>(resultExp);
416 
417  var constExp = (SqlConstantExpression)resultExp;
418  Assert.IsNotNull(constExp.Value.Value);
419  Assert.IsInstanceOf<BooleanType>(constExp.Value.Type);
420  Assert.IsInstanceOf<SqlBoolean>(constExp.Value.Value);
421 
422  var actual = ((SqlBoolean)constExp.Value.Value);
423  var expectedResult = new SqlBoolean(true);
424  Assert.AreEqual(expectedResult, actual);
425  }
426 
427  [Test]
428  public void NumericIsNullFalse() {
429  var exp1 = SqlExpression.Constant(DataObject.Number(new SqlNumber(747748)));
430  var exp2 = SqlExpression.Constant(DataObject.Null());
431  var orExp = SqlExpression.Is(exp1, exp2);
432 
433  SqlExpression resultExp = null;
434  Assert.DoesNotThrow(() => resultExp = orExp.Evaluate());
435  Assert.IsNotNull(resultExp);
436  Assert.IsInstanceOf<SqlConstantExpression>(resultExp);
437 
438  var constExp = (SqlConstantExpression)resultExp;
439  Assert.IsNotNull(constExp.Value.Value);
440  Assert.IsInstanceOf<BooleanType>(constExp.Value.Type);
441  Assert.IsInstanceOf<SqlBoolean>(constExp.Value.Value);
442 
443  var actual = ((SqlBoolean)constExp.Value.Value);
444  var expectedResult = new SqlBoolean(false);
445  Assert.AreEqual(expectedResult, actual);
446  }
447 
448  [TestCase("Antonello", "Anto%", true)]
449  [TestCase("Antonello", "Anto", false)]
450  [TestCase("Antonello", "%nello", true)]
451  [TestCase("Antonello", "Anto_ello", true)]
452  [TestCase("Antonello", "Anton__ello", false)]
453  [TestCase("Antonello", "%Antonello%", true)]
454  [TestCase("Antonello", "Antonello_", false)]
455  [TestCase("Antonello Provenzano", "Antonello%", true)]
456  public void StringLikesPattern(string input, string patern, bool expected) {
457  var exp1 = SqlExpression.Constant(DataObject.String(patern));
458  var exp2 = SqlExpression.Constant(DataObject.String(input));
459  var likeExp = SqlExpression.Like(exp1, exp2);
460 
461  SqlExpression resultExp = null;
462  Assert.DoesNotThrow(() => resultExp = likeExp.Evaluate());
463  Assert.IsNotNull(resultExp);
464  Assert.IsInstanceOf<SqlConstantExpression>(resultExp);
465 
466  var constExp = (SqlConstantExpression)resultExp;
467  Assert.IsNotNull(constExp.Value.Value);
468  Assert.IsInstanceOf<BooleanType>(constExp.Value.Type);
469  Assert.IsInstanceOf<SqlBoolean>(constExp.Value.Value);
470 
471  var actual = ((SqlBoolean)constExp.Value.Value);
472  var expectedResult = new SqlBoolean(expected);
473  Assert.AreEqual(expectedResult, actual);
474  }
475  }
476 }
void NumericEqualTo(double a, double b, bool expected)
static SqlBinaryExpression Divide(SqlExpression left, SqlExpression right)
static SqlBinaryExpression And(SqlExpression left, SqlExpression right)
static SqlBinaryExpression Multiply(SqlExpression left, SqlExpression right)
void NumericXOr(double a, double b, double expected)
static DataObject Double(double value)
Definition: DataObject.cs:588
static DataObject Number(SqlNumber value)
Definition: DataObject.cs:552
static DataObject Null(SqlType type)
Definition: DataObject.cs:630
static SqlBinaryExpression Equal(SqlExpression left, SqlExpression right)
static SqlBinaryExpression SmallerThan(SqlExpression left, SqlExpression right)
static DataObject String(string s)
Definition: DataObject.cs:592
static DataObject Boolean(SqlBoolean value)
Definition: DataObject.cs:544
void StringLikesPattern(string input, string patern, bool expected)
virtual SqlExpression Evaluate(EvaluateContext context)
When overridden by a derived class, this method evaluates the expression within the provided context...
static SqlBinaryExpression Modulo(SqlExpression left, SqlExpression right)
static SqlBinaryExpression Add(SqlExpression left, SqlExpression right)
static SqlBinaryExpression Or(SqlExpression left, SqlExpression right)
static SqlBinaryExpression NotEqual(SqlExpression left, SqlExpression right)
Represents a dynamic object that encapsulates a defined SqlType and a compatible constant ISqlObject ...
Definition: DataObject.cs:35
static SqlBinaryExpression XOr(SqlExpression left, SqlExpression right)
static SqlBinaryExpression Subtract(SqlExpression left, SqlExpression right)
void NumericGreaterThan(double a, double b, bool expected)
static SqlBinaryExpression Like(SqlExpression left, SqlExpression right)
static readonly SqlNumber Null
Definition: SqlNumber.cs:31
An expression that holds a constant value.
static DataObject VarChar(string s)
Definition: DataObject.cs:622
Deveel.Data.Sql.Objects.SqlBoolean SqlBoolean
Definition: DataObject.cs:26
Defines the base class for instances that represent SQL expression tree nodes.
static SqlConstantExpression Constant(object value)
void NumericNotEqualTo(double a, double b, bool expected)
Deveel.Data.Sql.Objects.SqlString SqlString
Definition: DataObject.cs:27
static SqlBinaryExpression GreaterThan(SqlExpression left, SqlExpression right)
static SqlBinaryExpression Is(SqlExpression left, SqlExpression right)
void NumericSmallerThan(double a, double b, bool expected)