1 | //===----------------------------------------------------------------------===// |
2 | // DuckDB |
3 | // |
4 | // duckdb/common/value_operations/value_operations.hpp |
5 | // |
6 | // |
7 | //===----------------------------------------------------------------------===// |
8 | |
9 | #pragma once |
10 | |
11 | #include "duckdb/common/types/value.hpp" |
12 | |
13 | namespace duckdb { |
14 | |
15 | struct ValueOperations { |
16 | //===--------------------------------------------------------------------===// |
17 | // Comparison Operations |
18 | //===--------------------------------------------------------------------===// |
19 | // A == B |
20 | static bool Equals(const Value &left, const Value &right); |
21 | // A != B |
22 | static bool NotEquals(const Value &left, const Value &right); |
23 | // A > B |
24 | static bool GreaterThan(const Value &left, const Value &right); |
25 | // A >= B |
26 | static bool GreaterThanEquals(const Value &left, const Value &right); |
27 | // A < B |
28 | static bool LessThan(const Value &left, const Value &right); |
29 | // A <= B |
30 | static bool LessThanEquals(const Value &left, const Value &right); |
31 | //===--------------------------------------------------------------------===// |
32 | // Distinction Operations |
33 | //===--------------------------------------------------------------------===// |
34 | // A == B, NULLs equal |
35 | static bool NotDistinctFrom(const Value &left, const Value &right); |
36 | // A != B, NULLs equal |
37 | static bool DistinctFrom(const Value &left, const Value &right); |
38 | // A > B, NULLs last |
39 | static bool DistinctGreaterThan(const Value &left, const Value &right); |
40 | // A >= B, NULLs last |
41 | static bool DistinctGreaterThanEquals(const Value &left, const Value &right); |
42 | // A < B, NULLs last |
43 | static bool DistinctLessThan(const Value &left, const Value &right); |
44 | // A <= B, NULLs last |
45 | static bool DistinctLessThanEquals(const Value &left, const Value &right); |
46 | }; |
47 | } // namespace duckdb |
48 | |