MySQL 5.6.14 Source Code Document
|
Public Types | |
enum | NextResultOutcome { NextResult_error = -1, NextResult_gotRow = 0, NextResult_scanComplete = 1, NextResult_bufferEmpty = 2 } |
Public Member Functions | |
Uint32 | getNoOfOperations () const |
NdbQueryOperation * | getQueryOperation (const char *ident) const |
NdbQueryOperation * | getQueryOperation (Uint32 index) const |
Uint32 | getNoOfParameters () const |
const NdbParamOperand * | getParameter (const char *name) const |
const NdbParamOperand * | getParameter (Uint32 num) const |
int | setBound (const NdbRecord *keyRecord, const struct NdbIndexScanOperation::IndexBound *bound) |
NextResultOutcome | nextResult (bool fetchAllowed=true, bool forceSend=false) |
NdbTransaction * | getNdbTransaction () const |
void | close (bool forceSend=false) |
Friends | |
class | NdbQueryImpl |
Error Handling | |
const NdbError & | getNdbError () const |
NdbQueryImpl & | getImpl () const |
int | isPrunable (bool &pruned) const |
Definition at line 106 of file NdbQueryOperation.hpp.
Possible return values from nextResult().
Definition at line 116 of file NdbQueryOperation.hpp.
void NdbQuery::close | ( | bool | forceSend = false | ) |
Close query.
Will release most of the internally allocated objects owned by this NdbQuery and detach itself from the NdbQueryDef used to instantiate it.
The application may destruct the NdbQueryDef after ::close() has been called on all NdbQuery objects instantiated from it.
Definition at line 1387 of file NdbQueryOperation.cpp.
|
inline |
Get object implementing NdbQuery interface.
Definition at line 208 of file NdbQueryOperation.hpp.
const NdbError & NdbQuery::getNdbError | ( | ) | const |
Get error object with information about the latest error.
Definition at line 1399 of file NdbQueryOperation.cpp.
NdbTransaction * NdbQuery::getNdbTransaction | ( | ) | const |
Get NdbTransaction object for this query operation
Definition at line 1393 of file NdbQueryOperation.cpp.
int NdbQuery::isPrunable | ( | bool & | pruned | ) | const |
Check if this is a pruned range scan. A range scan is pruned if the ranges are such that only a subset of the fragments need to be scanned for matching tuples.
pruned | This will be set to true if the operation is a pruned range scan. |
Definition at line 1403 of file NdbQueryOperation.cpp.
NdbQuery::NextResultOutcome NdbQuery::nextResult | ( | bool | fetchAllowed = true , |
bool | forceSend = false |
||
) |
Get the next tuple(s) from the global cursor on the query.
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.
fetchAllowed | If set to false, then fetching is disabled |
forceSend | If true send will occur immediately (see Adaptive Send Algorithm) |
When fetchAllowed is set to false, the NDB API will not request new batches from the NDB Kernel when all received rows have been exhausted, but will instead return 2 from nextResult(), indicating that new batches must be requested. You must then call nextResult with fetchAllowed = true in order to contact the NDB Kernel for more records, after taking over locks as appropriate.
Definition at line 1381 of file NdbQueryOperation.cpp.