MySQL 5.6.14 Source Code Document
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
NdbQueryOptions Class Reference

#include <NdbQueryBuilder.hpp>

Public Types

enum  MatchType {
  MatchAll, MatchNonNull, MatchNullOnly, MatchSingle,
  Default = MatchAll
}
enum  ScanOrdering { ScanOrdering_void, ScanOrdering_unordered, ScanOrdering_ascending, ScanOrdering_descending }

Public Member Functions

int setOrdering (ScanOrdering ordering)
int setMatchType (MatchType matchType)
int setParent (const class NdbQueryOperationDef *parent)
int setInterpretedCode (const class NdbInterpretedCode &code)
const NdbQueryOptionsImpl & getImpl () const

Detailed Description

NdbQueryOptions used to pass options when building a NdbQueryOperationDef.

It will normally be constructed on the stack, the required options specified with the set'ers methods, and then supplied as an argument when creating the NdbQueryOperationDef.

Definition at line 112 of file NdbQueryBuilder.hpp.

Member Enumeration Documentation

Different match criteria may be specified for an operation. These controls when rows are considdered equal, and a result row is produced (or accepted).

These are hints only. The implementation is allowed to take a conservative approach and produce more rows than specified by the MatchType. However, not more rows than specified by 'MatchAll' should be produced. As additional rows should be expected, the receiver should be prepared to filter away unwanted rows if another MatchType than 'MatchAll' was specified.

Definition at line 128 of file NdbQueryBuilder.hpp.

Ordering of scan results when scanning ordered indexes.

Enumerator:
ScanOrdering_void 

Undefined (not yet set).

ScanOrdering_unordered 

Results will not be ordered.

Definition at line 142 of file NdbQueryBuilder.hpp.

Member Function Documentation

int NdbQueryOptions::setInterpretedCode ( const class NdbInterpretedCode code)

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);

Parameters
codeThe interpreted code. This object is copied internally, meaning that 'code' may be destroyed as soon as this method returns.
Returns
0 if ok, -1 in case of error (call getNdbError() for details.)

Definition at line 483 of file NdbQueryBuilder.cpp.

int NdbQueryOptions::setMatchType ( MatchType  matchType)

Define how NULL values and duplicates should be handled when equal tuples are matched.

Definition at line 453 of file NdbQueryBuilder.cpp.

int NdbQueryOptions::setOrdering ( ScanOrdering  ordering)

Define result ordering. Alternatively, ordering may be set when the query definition has been instantiated, using NdbQueryOperation::setOrdering().

Parameters
orderingThe desired ordering of results.

Definition at line 438 of file NdbQueryBuilder.cpp.

Here is the caller graph for this function:

int NdbQueryOptions::setParent ( const class NdbQueryOperationDef parent)

Define an (additional) parent dependency on the specified parent operation. If linkedValues are also defined for the operation which setParent() applies to, all implicit parents specified as part of the 'linkedValues' should be grandparents of 'parent'.

Definition at line 468 of file NdbQueryBuilder.cpp.

Here is the call graph for this function:


The documentation for this class was generated from the following files: