MySQL 5.6.14 Source Code Document
|
Public Member Functions | |
Uint32 | getNoOfParentOperations () const |
NdbQueryOperation * | getParentOperation (Uint32 parentNo) const |
Uint32 | getNoOfChildOperations () const |
NdbQueryOperation * | getChildOperation (Uint32 childNo) const |
const NdbQueryOperationDef & | getQueryOperationDef () const |
NdbQuery & | getQuery () const |
NdbRecAttr * | getValue (const char *anAttrName, char *resultBuffer=0) |
NdbRecAttr * | getValue (Uint32 anAttrId, char *resultBuffer=0) |
NdbRecAttr * | getValue (const NdbDictionary::Column *column, char *resultBuffer=0) |
int | setResultRowBuf (const NdbRecord *rec, char *resBuffer, const unsigned char *result_mask=0) |
int | setResultRowRef (const NdbRecord *rec, const char *&bufRef, const unsigned char *result_mask=0) |
NdbQueryOperationImpl & | getImpl () const |
int | setOrdering (NdbQueryOptions::ScanOrdering ordering) |
NdbQueryOptions::ScanOrdering | getOrdering () const |
int | setParallelism (Uint32 parallelism) |
int | setMaxParallelism () |
int | setAdaptiveParallelism () |
int | setBatchSize (Uint32 batchSize) |
int | setInterpretedCode (const NdbInterpretedCode &code) const |
NdbQuery::NextResultOutcome | firstResult () |
NdbQuery::NextResultOutcome | nextResult (bool fetchAllowed=true, bool forceSend=false) |
bool | isRowNULL () const |
bool | isRowChanged () const |
Friends | |
class | NdbQueryOperationImpl |
Definition at line 231 of file NdbQueryOperation.hpp.
NdbQuery::NextResultOutcome NdbQueryOperation::firstResult | ( | ) |
Local cursor:
Navigate to first result row in this batch of results which depends on the current row(s) from all its ancestors.
Definition at line 1530 of file NdbQueryOperation.cpp.
|
inline |
Get object implementing NdbQueryOperation interface.
Definition at line 322 of file NdbQueryOperation.hpp.
NdbQueryOptions::ScanOrdering NdbQueryOperation::getOrdering | ( | ) | const |
Get the result ordering for this operation.
Definition at line 1503 of file NdbQueryOperation.cpp.
NdbRecAttr * NdbQueryOperation::getValue | ( | const char * | anAttrName, |
char * | resultBuffer = 0 |
||
) |
Defines a retrieval operation of an attribute value. The NDB API allocate memory for the NdbRecAttr object that will hold the returned attribute value.
anAttrName | Attribute name |
resultBuffer | If this is non-NULL, then the attribute value will be returned in this parameter. If NULL, then the attribute value will only be stored in the returned NdbRecAttr object. |
Definition at line 1450 of file NdbQueryOperation.cpp.
NdbQuery::NextResultOutcome NdbQueryOperation::nextResult | ( | bool | fetchAllowed = true , |
bool | forceSend = false |
||
) |
Local cursor:
Get the next tuple(s) from this operation (and all its descendants?) which depends on the current row(s) from all its ancestors.
Result row / columns will be updated in the respective result handlers as previously specified on each NdbQueryOperation either by assigning a NdbRecord/rowBuffer or assigning NdbRecAttr to each column to be retrieved.
If the set of cached records in the NdbApi has been consumed, more will be requested from the datanodes only iff:
The arguments fetchAllowed and forceSend are ignored if this operation is not the root of the pushed query.
Definition at line 1536 of file NdbQueryOperation.cpp.
int NdbQueryOperation::setAdaptiveParallelism | ( | ) |
Let the system dynamically choose the number of fragments to scan in parallel. The system will try to choose a value that gives optimal performance. This is the default for all scans but the root scan. This method only implemented for non-root scan operations.
Definition at line 1516 of file NdbQueryOperation.cpp.
int NdbQueryOperation::setBatchSize | ( | Uint32 | batchSize | ) |
Set the batch size (max rows per batch) for this operation. This only applies to scan operations, as lookup operations always will have the same batch size as its parent operation, or 1 if it is the root operation.
batchSize | Batch size (in number of rows). A value of 0 means use the default batch size. |
Definition at line 1520 of file NdbQueryOperation.cpp.
int NdbQueryOperation::setInterpretedCode | ( | const NdbInterpretedCode & | code | ) | const |
Set the NdbInterpretedCode needed for defining a conditional filter (aka: predicate) for this operation. Might be used both on scan and lookup operations.
Typically, one would create NdbScanFilter and NdbInterpretedCode objects on the stack, e.g.: NdbInterpretedCode code(table); NdbScanFilter filter(code); filter.begin(); filter.ge(0, 5U); // Check if column 1 is greater of equal to 5. filter.end(); queryOp->setInterpretedCode(code);
code | The interpreted code. This object is copied internally, meaning that 'code' may be destroyed as soon as this method returns. |
Definition at line 1524 of file NdbQueryOperation.cpp.
int NdbQueryOperation::setMaxParallelism | ( | ) |
Set the number of fragments to be scanned in parallel to the maximum possible value. This is the default for the root scan operation.
Definition at line 1512 of file NdbQueryOperation.cpp.
int NdbQueryOperation::setOrdering | ( | NdbQueryOptions::ScanOrdering | ordering | ) |
Define result ordering for ordered index scan. It is an error to call this method on an operation that is not a scan, or to call it if an ordering was already set on the operation defintion by calling NdbQueryOperationDef::setOrdering().
ordering | The desired ordering of results. |
Definition at line 1497 of file NdbQueryOperation.cpp.
int NdbQueryOperation::setParallelism | ( | Uint32 | parallelism | ) |
Set the number of fragments to be scanned in parallel. This only applies to table scans and non-sorted scans of ordered indexes. This method is only implemented for then root scan operation.
Definition at line 1508 of file NdbQueryOperation.cpp.
int NdbQueryOperation::setResultRowBuf | ( | const NdbRecord * | rec, |
char * | resBuffer, | ||
const unsigned char * | result_mask = 0 |
||
) |
Retrieval of entire or partial rows may also be specified. For partial retrieval a bitmask should supplied.
The behaviour of mixing NdbRecord retrieval style with NdbRecAttr is is undefined - It should probably not be allowed.
rec | Is a pointer to a NdbRecord specifying the byte layout of the result row. |
Defines a buffer sufficient large to hold the result row.
Refers a pointer which will be updated to refer the current result row for this operand.
result_mask | defines as subset of attributes to read. The column is only affected if 'mask[attrId >> 3] & (1<<(attrId & 7))' is set |
Definition at line 1475 of file NdbQueryOperation.cpp.