This section provides information about the
NdbIndexOperation
class.
- Parent class
- Child classes
None
- Description
-
NdbIndexOperation
represents an index operation for use in transactions. This class inherits fromNdbOperation
.NdbIndexOperation
can 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
NdbIndexOperation
class 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
NdbIndexOperation
as aDELETE
operation. When theNdbTransaction::execute()
method is invoked, the operation deletes a tuple from the table.- Signature
int deleteTuple ( void )
- Parameters
None.
- Return value
0
on success,-1
on failure.
- Description
Gets the index, given an index operation.
- Signature
const NdbDictionary::Index* getIndex ( void ) const
- Parameters
None.
- Return value
A pointer to an
Index
object.
- Description
This method defines the
NdbIndexOperation
as aREAD
operation. When theNdbTransaction::execute()
method is invoked, the operation reads a tuple.- Signature
int readTuple ( LockMode mode )
- Parameters
mode
specifies the locking mode used by the read operation. See NdbOperation::LockMode, for possible values.- Return value
0
on success,-1
on failure.
- Description
This method defines the
NdbIndexOperation
as anUPDATE
operation. When theNdbTransaction::execute()
method is invoked, the operation updates a tuple found in the table.- Signature
int updateTuple ( void )
- Parameters
None.
- Return value
0
on success,-1
on failure.