Comparison Operators
Note
Indexing Service is no longer supported as of Windows XP and is unavailable for use as of Windows 8. Instead, use Windows Search for client side search and Microsoft Search Server Express for server side search.
The following list describes the comparison operators.
-
DBOP_is_NULL, DBOP_is_NOT_NULL
-
Comparison to NULL value. Both operators are needed, since "NOT is_NULL" and "is_NOT_NULL" differ in SQL if the operand is a row with some (but not all) NULL values. These operators take one scalar input and produce a Boolean result.
-
DBOP_equal, DBOP_not_equal, DBOP_less, DBOP_less_equal, DBOP_greater, DBOP_greater_equal, DBOP_equal_all, DBOP_not_equal_all, DBOP_less_all, DBOP_less_equal_all, DBOP_greater_all, DBOP_greater_equal_all, DBOP_equal_any, DBOP_not_equal_any, DBOP_less_any, DBOP_less_equal_any, DBOP_greater_any, DBOP_greater_equal_any
-
Comparison operators with semantics as in SQL. For the normal comparison operators, the two input rows must both be scalars or both be rows. Otherwise, the scalar is converted into a one-column row as necessary. The "_all" and "_any" operators require a scalar left input and a table-valued right input, where a column value in a chaptered column is a special case of a table. These operators produce Boolean output.
Row-valued comparison refers to the comparison between two row instances. Multivalued comparison refers to the comparison between a row instance and a table (such as "_all" and "_any" operators). The rules for row-valued comparisons are based on ANSI SQL semantics. The rules for multivalued comparisons are an extension of the rule-valued comparisons.
The weight of this node is stored as a DBVALUEKIND_I4 in an lValue member of the DBCOMMANDTREE structure.
-
DBOP_anybits, DBOP_allbits, DBOP_anybits_any, DBOP_allbits_any, DBOP_anybits_all, DBOP_allbits_all
-
Comparison operators that have the same syntax as other comparison operators. These operators take two inputs, with the first being a column and the second being a scalar value to compare with the column. The specific semantics of these nodes are as follows: DBOP_any_bits is true if the result of a bitwise AND operation performed on the column value and the constant is nonzero. DBOP_all_bits is true if the result of a bitwise AND operation performed on a column value and the constant equals the constant. As with other comparison operators, there are also "_any" and "_all" versions of these nodes.
The weight of this node is stored as a DBVALUEKIND_I4 in the lValue member of the DBCOMMANDTREE structure.
-
DBOP_between, DBOP_between_unordered
-
SQL comparison operations. "Between_unordered" first sorts the bounding values; "a between_unordered b and c" is equivalent to "a >= min (b, c) and a <= max (b, c)", whereas "a between b and c" is equivalent to "a >= b and a <= c." All variants of "between" are inclusive, meaning that a value equal to one of the end points is acceptable. There is no exclusive "between" variant. These operations require three scalar inputs (which may be rows), and produce a Boolean result.
-
DBOP_match, DBOP_match_unique, DBOP_match_partial, DBOP_match_partial_unique, DBOP_match_full, DBOP_match_full_unique
-
SQL's match predicate. These operation require two scalar inputs (which may be rows), and produce a Boolean output.
-
DBOP_and, DBOP_or, DBOP_xor, DBOP_equivalent
-
These Boolean operators represent the logical AND, OR, exclusive OR, and equivalence operators. They take two or more Boolean inputs (except DBOP_equivalent, which takes exactly two), and produce a Boolean result. The weight of this node is stored as DBVALUEKIND_I4 in the value.lValue member.
-
DBOP_not
-
This operator requires one Boolean input and produces one Boolean result. The weight of this node is stored as DBVALUEKIND_I4 in the value.lValue member.
-
DBOP_implies
-
This operator represents Boolean implication. It takes two mandatory Boolean inputs and produces a Boolean output according to the following table:
Input1 Input2 Result False False True False True True True False False True True True