Documentation Home
MySQL NDB Cluster API Developer Guide
Download this Manual

2.3.28 The NdbScanFilter Class


This section discusses the NdbScanFilter class and its public members.

Parent class.  None

Child classes.  None

Description.  NdbScanFilter provides an alternative means of specifying filters for scan operations.


Prior to MySQL 5.1.14, the comparison methods of this class did not work with BIT values (see Bug #24503).

Development of this interface continues; the characteristics of the NdbScanFilter class are likely to change further in future releases.

Methods.  The following table lists the public methods of this class and the purpose or use of each method:

Method Purpose / Use
NdbScanFilter() Constructor method
~NdbScanFilter() Destructor method
begin() Begins a compound (set of conditions)
cmp() Compares a column value with an arbitrary value
end() Ends a compound
eq() Tests for equality
ge() Tests for a greater-than-or-equal condition
getNdbError() Provides access to error information
getNdbOperation() Gets the associated NdbOperation
gt() Tests for a greater-than condition
isfalse() Defines a term in a compound as FALSE
isnotnull() Tests whether a column value is not NULL
isnull() Tests whether a column value is NULL
istrue() Defines a term in a compound as TRUE
le() Tests for a less-than-or-equal condition
lt() Tests for a less-than condition
ne() Tests for inequality

NdbScanFilter Integer Comparison Methods.  NdbScanFilter provides several convenience methods which can be used in lieu of the cmp() method when the arbitrary value to be compared is an integer: eq(), ge(), gt(), le(), lt(), and ne().

Each of these methods is essentially a wrapper for cmp() that includes an appropriate value of BinaryCondition for that method's condition parameter; for example, NdbScanFilter::eq() is defined like this:

int eq(int columnId, Uint32 value)
  return cmp(BinaryCondition::COND_EQ, columnId, &value, 4);

Types.  The NdbScanFilter class defines two public types:

  • BinaryCondition: The type of condition, such as lower bound or upper bound.

  • Group: A logical grouping operator, such as AND or OR.

Class diagram.  This diagram shows all the public members of the NdbScanFilter class:

Figure 2.23 NdbScanFilter

Public members of the NdbScanFilter class.

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