| MySQL 5.6.14 Source Code Document
    | 
A simple way to specify filters for scan operations. More...
#include <NdbScanFilter.hpp>
| Public Types | |
| enum | Group { AND = 1, OR = 2, NAND = 3, NOR = 4 } | 
| enum | BinaryCondition { COND_LE = 0, COND_LT = 1, COND_GE = 2, COND_GT = 3, COND_EQ = 4, COND_NE = 5, COND_LIKE = 6, COND_NOT_LIKE = 7, COND_AND_EQ_MASK = 8, COND_AND_NE_MASK = 9, COND_AND_EQ_ZERO = 10, COND_AND_NE_ZERO = 11 } | 
| enum | Error { FilterTooLarge = 4294 } | 
| Public Member Functions | |
| NdbScanFilter (NdbInterpretedCode *code) | |
| NdbScanFilter (class NdbOperation *op) | |
| int | istrue () | 
| int | isfalse () | 
| int | cmp (BinaryCondition cond, int ColId, const void *val, Uint32 len=0) | 
| int | isnull (int ColId) | 
| int | isnotnull (int ColId) | 
| struct NdbError & | getNdbError () const | 
| const NdbInterpretedCode * | getInterpretedCode () const | 
| NdbOperation * | getNdbOperation () const | 
| Grouping | |
| int | begin (Group group=AND) | 
| int | end () | 
| Integer Comparators | |
| int | eq (int ColId, Uint32 value) | 
| int | ne (int ColId, Uint32 value) | 
| int | lt (int ColId, Uint32 value) | 
| int | le (int ColId, Uint32 value) | 
| int | gt (int ColId, Uint32 value) | 
| int | ge (int ColId, Uint32 value) | 
| int | eq (int ColId, Uint64 value) | 
| int | ne (int ColId, Uint64 value) | 
| int | lt (int ColId, Uint64 value) | 
| int | le (int ColId, Uint64 value) | 
| int | gt (int ColId, Uint64 value) | 
| int | ge (int ColId, Uint64 value) | 
| Friends | |
| class | NdbScanFilterImpl | 
A simple way to specify filters for scan operations.
Definition at line 35 of file NdbScanFilter.hpp.
Definition at line 84 of file NdbScanFilter.hpp.
| enum NdbScanFilter::Group | 
Group operators
| AND | (x1 AND x2 AND x3) | 
| OR | (x1 OR x2 OR X3) | 
| NAND | NOT (x1 AND x2 AND x3) | 
| NOR | NOT (x1 OR x2 OR x3) | 
Definition at line 77 of file NdbScanFilter.hpp.
| NdbScanFilter::NdbScanFilter | ( | NdbInterpretedCode * | code | ) | 
Constructor Using this constructor, a ScanFilter is created which will build and finalise a scan filter program using the NdbInterpretedCode object passed. Once defined, the generated NdbInterpretedCode object can be used to specify a scan filter for one or more NdbRecord defined ScanOperations on the supplied table. The NdbInterpretedCode object is passed to the ScanTable() or ScanIndex() call via the ScanOptions structure.
| code | Pointer to the NdbInterpretedCode object to build the ScanFilter in. | 
Definition at line 126 of file NdbScanFilter.cpp.
| NdbScanFilter::NdbScanFilter | ( | class NdbOperation * | op | ) | 
Constructor This constructor is used to create an ScanFilter object for use with a non-NdbRecord defined ScanOperation.
As part of the filter definition, it is automatically added to the supplied operation. ScanFilters defined this way can only be used with the passed Scan operation.
| op | The NdbOperation that the filter is applied to. Note that this MUST be an NdbScanOperation or NdbIndexScanOperation object created using the NdbTransaction->getNdbScanOperation() or NdbTransaciton->getNdbIndexScanOperation() methods | 
Definition at line 134 of file NdbScanFilter.cpp.

Begin of compound. If no group type is passed, defaults to AND. ®return 0 if successful, -1 otherwise
Definition at line 169 of file NdbScanFilter.cpp.
| int NdbScanFilter::cmp | ( | BinaryCondition | cond, | 
| int | ColId, | ||
| const void * | val, | ||
| Uint32 | len = 0 | ||
| ) | 
Compare column ColId with val
For all BinaryConditions except LIKE and NOT_LIKE, the value pointed to by val should be in normal column format as described in the documentation for NdbOperation::equal(). For BinaryConditions LIKE and NOT_LIKE, the value pointed to by val should NOT include initial length bytes. For LIKE and NOT_LIKE, the % and ? wildcards are supported. For bitmask operations, see the bitmask format information against the branch_col_and_mask_eq_mask instruction in NdbInterpretedCode.hpp
®return 0 if successful, -1 otherwise
Definition at line 690 of file NdbScanFilter.cpp.


| int NdbScanFilter::end | ( | ) | 
End of compound. ®return 0 if successful, -1 otherwise
Definition at line 257 of file NdbScanFilter.cpp.
| 
 | inline | 
Compare column value with integer for equal ®return 0 if successful, -1 otherwise
Definition at line 155 of file NdbScanFilter.hpp.

| 
 | inline | 
Compare column value with integer for equal. 64-bit. ®return 0 if successful, -1 otherwise
Definition at line 181 of file NdbScanFilter.hpp.

| 
 | inline | 
Compare column value with integer for greater than or equal. ®return 0 if successful, -1 otherwise
Definition at line 176 of file NdbScanFilter.hpp.

| 
 | inline | 
Compare column value with integer for greater than or equal. 64-bit. ®return 0 if successful, -1 otherwise
Definition at line 201 of file NdbScanFilter.hpp.

| const NdbInterpretedCode * NdbScanFilter::getInterpretedCode | ( | ) | const | 
Get filter's associated InterpretedCode object. For ScanFilters associated with a non-NdbRecord scan operation, this method always returns NULL.
Definition at line 738 of file NdbScanFilter.cpp.
| 
 | read | 
Get filter level error.
Errors encountered when building a ScanFilter do not propagate to any involved NdbOperation object. This method gives access to error information.
Definition at line 731 of file NdbScanFilter.cpp.
| NdbOperation * NdbScanFilter::getNdbOperation | ( | ) | const | 
Get NdbScanFilter's associated NdbScanOperation
Where the NdbScanFilter was constructed with an NdbOperation this method can be used to obtain a pointer to the NdbOperation object. For other NdbScanFilter objects it will return NULL
Definition at line 751 of file NdbScanFilter.cpp.
| 
 | inline | 
Compare column value with integer for greater than. ®return 0 if successful, -1 otherwise
Definition at line 172 of file NdbScanFilter.hpp.

| 
 | inline | 
Compare column value with integer for greater than. 64-bit. ®return 0 if successful, -1 otherwise
Definition at line 197 of file NdbScanFilter.hpp.

| int NdbScanFilter::isfalse | ( | ) | 
Define one term of the current group as FALSE ®return 0 if successful, -1 otherwise
Definition at line 390 of file NdbScanFilter.cpp.
| int NdbScanFilter::isnotnull | ( | int | ColId | ) | 
Check if column value is non-NULL ®return 0 if successful, -1 otherwise
Definition at line 488 of file NdbScanFilter.cpp.
| int NdbScanFilter::isnull | ( | int | ColId | ) | 
Check if column value is NULL ®return 0 if successful, -1 otherwise
Definition at line 478 of file NdbScanFilter.cpp.
| int NdbScanFilter::istrue | ( | ) | 
Define one term of the current group as TRUE ®return 0 if successful, -1 otherwise
Definition at line 368 of file NdbScanFilter.cpp.
| 
 | inline | 
Compare column value with integer for less than or equal. ®return 0 if successful, -1 otherwise
Definition at line 168 of file NdbScanFilter.hpp.

| 
 | inline | 
Compare column value with integer for less than or equal. 64-bit. ®return 0 if successful, -1 otherwise
Definition at line 193 of file NdbScanFilter.hpp.

| 
 | inline | 
Compare column value with integer for less than. ®return 0 if successful, -1 otherwise
Definition at line 164 of file NdbScanFilter.hpp.

| 
 | inline | 
Compare column value with integer for less than. 64-bit. ®return 0 if successful, -1 otherwise
Definition at line 189 of file NdbScanFilter.hpp.

| 
 | inline | 
Compare column value with integer for not equal. ®return 0 if successful, -1 otherwise
Definition at line 160 of file NdbScanFilter.hpp.

| 
 | inline | 
Compare column value with integer for not equal. 64-bit. ®return 0 if successful, -1 otherwise
Definition at line 185 of file NdbScanFilter.hpp.
