2.3.27 The NdbScanFilter Class

2.3.27.1 NdbScanFilter Types
2.3.27.2 NdbScanFilter Methods

Abstract

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.

Important

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:

MethodPurpose / 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

For detailed descriptions, signatures, and examples of use for each of these methods, see Section 2.3.27.2, “NdbScanFilter Methods”.

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:

See Section 2.3.27.1, “NdbScanFilter Types”.

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

Public members of the NdbScanFilter class.