2.3.27.1 NdbScanFilter Types

2.3.27.1.1 The NdbScanFilter::BinaryCondition Type
2.3.27.1.2 The NdbScanFilter::Group Type

Abstract

This section details the public types belonging to the NdbScanFilter class.

2.3.27.1.1 The NdbScanFilter::BinaryCondition Type

Description.  This type represents a condition based on the comparison of a column value with some arbitrary value—that is, a bound condition. A value of this type is used as the first argument to NdbScanFilter::cmp().

Enumeration values.  Possible values are shown, along with descriptions, in the following table:

Enumeration valueDescriptionType of column values compared
COND_EQEquality (=)any
COND_NEInequality (<> or !=)any
COND_LELower bound (<=)any
COND_LTStrict lower bound (<)any
COND_GEUpper bound (>=)any
COND_GTStrict upper bound (>)any
COND_LIKELIKE conditionstring or binary
COND_NOTLIKENOT LIKE conditionstring or binary
COL_AND_MASK_EQ_MASKColumn value ANDed with bitmask is equal to bitmaskBIT
COL_AND_MASK_NE_MASKColumn value ANDed with bitmask is not equal to bitmaskBIT
COL_AND_MASK_EQ_ZEROColumn value ANDed with bitmask is equal to zeroBIT
COL_AND_MASK_NE_ZEROColumn value ANDed with bitmask is not equal to zeroBIT

When used in comparisons with COND_EQ, COND_NE, COND_LT, COND_LE, COND_GT, or COND_GE, fixed-length character and binary column values must be prefixed with the column size, and must be padded to length. This is not necessary for such values when used in COND_LIKE, COND_NOTLIKE, COL_AND_MASK_EQ_MASK, COL_AND_MASK_NE_MASK, COL_AND_MASK_EQ_ZERO, or COL_AND_MASK_NE_ZERO comparisons.

String comparisons.  Strings compared using COND_LIKE and COND_NOTLIKE can use the pattern metacharacters % and _. See Section 2.3.27.2.3, “NdbScanFilter::cmp()”, for more information.

BIT comparisons.  The BIT comparison operators COL_AND_MASK_EQ_MASK, COL_AND_MASK_NE_MASK, COL_AND_MASK_EQ_ZERO, and COL_AND_MASK_NE_ZERO were added in MySQL Cluster NDB 6.3.20. Corresponding methods are also available for NdbInterpretedCode and NdbOperation beginning with MySQL Cluster NDB 6.3.20; for more information about these methods, see Section 2.3.23.1.8, “NdbInterpretedCode Bitwise Comparison Operations”.

2.3.27.1.2 The NdbScanFilter::Group Type

Description.  This type is used to describe logical (grouping) operators, and is used with the begin() method. (See Section 2.3.27.2.2, “NdbScanFilter::begin()”.)

Enumeration values.  Possible values are shown, along with descriptions, in the following table:

ValueDescription
ANDLogical AND: A AND B AND C
ORLogical OR: A OR B OR C
NANDLogical NOT AND: NOT (A AND B AND C)
NORLogical NOT OR: NOT (A OR B OR C)