This section provides information about the
NdbIndexOperation class.
- Parent class
- Child classes
None
- Description
-
NdbIndexOperationrepresents an index operation for use in transactions. This class inherits fromNdbOperation.NdbIndexOperationcan be used only with unique hash indexes; to work with ordered indexes, useNdbIndexScanOperation.This class has no public constructor. To create an instance of
NdbIndexOperation, it is necessary to use theNdbTransaction::getNdbIndexOperation()method. - Methods
-
The following table lists the public methods of this class and the purpose or use of each method:
Table 2.44 NdbIndexOperation class methods and descriptions
Name Description deleteTuple()Removes a tuple from a table getIndex()Gets the index used by the operation readTuple()Reads a tuple from a table updateTuple()Updates an existing tuple in a table Index operations are not permitted to insert tuples.
- Types
The
NdbIndexOperationclass defines no public types of its own.
For more information about the use of
NdbIndexOperation, see
Section 1.4.2.3.2, “Single-row operations”.
- Description
This method defines the
NdbIndexOperationas aDELETEoperation. When theNdbTransaction::execute()method is invoked, the operation deletes a tuple from the table.- Signature
int deleteTuple ( void )- Parameters
None.
- Return value
0on success,-1on failure.
- Description
Gets the index, given an index operation.
- Signature
const NdbDictionary::Index* getIndex ( void ) const- Parameters
None.
- Return value
A pointer to an
Indexobject.
- Description
This method defines the
NdbIndexOperationas aREADoperation. When theNdbTransaction::execute()method is invoked, the operation reads a tuple.- Signature
int readTuple ( LockMode mode )- Parameters
modespecifies the locking mode used by the read operation. See NdbOperation::LockMode, for possible values.- Return value
0on success,-1on failure.
- Description
This method defines the
NdbIndexOperationas anUPDATEoperation. When theNdbTransaction::execute()method is invoked, the operation updates a tuple found in the table.- Signature
int updateTuple ( void )- Parameters
None.
- Return value
0on success,-1on failure.