Documentation Home
MySQL NDB Cluster API Developer Guide
Download this Manual NdbScanFilter::BinaryCondition

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 value Description Type of column values compared
COND_EQ Equality (=) any
COND_NE Inequality (<> or !=) any
COND_LE Lower bound (<=) any
COND_LT Strict lower bound (<) any
COND_GE Upper bound (>=) any
COND_GT Strict upper bound (>) any
COND_LIKE LIKE condition string or binary
COND_NOTLIKE NOT LIKE condition string or binary
COL_AND_MASK_EQ_MASK Column value ANDed with bitmask is equal to bitmask BIT
COL_AND_MASK_NE_MASK Column value ANDed with bitmask is not equal to bitmask BIT
COL_AND_MASK_EQ_ZERO Column value ANDed with bitmask is equal to zero BIT
COL_AND_MASK_NE_ZERO Column value ANDed with bitmask is not equal to zero BIT

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, “NdbScanFilter::cmp()”, for more information.

BIT comparisons.  The BIT comparison operators are COL_AND_MASK_EQ_MASK, COL_AND_MASK_NE_MASK, COL_AND_MASK_EQ_ZERO, and COL_AND_MASK_NE_ZERO. Corresponding methods are available for NdbInterpretedCode and NdbOperation; for more information about these methods, see Section, “NdbInterpretedCode Bitwise Comparison Operations”.

User Comments
Sign Up Login You must be logged in to post a comment.