2.3.25 The NdbOperation Class NdbOperation::AbortOption NdbOperation::deleteTuple() NdbOperation::equal() NdbOperation::getBlobHandle() NdbOperation::getLockHandle NdbOperation::getLockMode() NdbOperation::getNdbError() NdbOperation::getNdbErrorLine() NdbOperation::getTable() NdbOperation::getTableName() NdbOperation::getNdbTransaction() NdbOperation::getType() NdbOperation::getValue() NdbOperation::insertTuple() NdbOperation::LockMode NdbOperation::readTuple() NdbOperation::setValue() NdbOperation::Type NdbOperation::writeTuple() NdbOperation::updateTuple()


This section discusses the NdbOperation class.

Parent class.  None

Child classes.  NdbIndexOperation, NdbScanOperation

NdbOperation Subclasses.  The following diagram shows the relationships of NdbOperation, its subclasses, and their public types:

Figure 2.20 NdbOperation subclasses

The NdbOperation class and its subclasses.

Description.  NdbOperation represents a generic data operation. Its subclasses represent more specific types of operations. See Section, “NdbOperation::Type” for a listing of operation types and their corresponding NdbOperation subclasses.

Methods.  The following table lists the public methods of this class and the purpose or use of each method:

MethodPurpose / Use
deleteTuple()Removes a tuple from a table
equal()Defines a search condition using equality
getBlobHandle()Used to access blob attributes
getLockHandle()Gets a lock handle for the operation
getLockMode()Gets the operation's lock mode
getNdbError()Gets the latest error
getNdbErrorLine()Gets the number of the method where the latest error occurred
getTableName()Gets the name of the table used for this operation
getTable()Gets the table object used for this operation
getNdbTransaction()Gets the NdbTransaction object for this operation
getType()Gets the type of operation
getValue()Allocates an attribute value holder for later access
insertTuple()Adds a new tuple to a table
readTuple()Reads a tuple from a table
setValue()Defines an attribute to set or update
updateTuple()Updates an existing tuple in a table
writeTuple()Inserts or updates a tuple

This class has no public constructor. To create an instance of NdbOperation, you must use NdbTransaction::getNdbOperation().

Types.  The NdbOperation class defines three public types, shown in the following table:

TypePurpose / Use
AbortOption()Determines whether a failed operation causes failure of the transaction of which it is part
LockMode()The type of lock used when performing a read operation
Type()Operation access types

Class diagram.  The following diagram shows all the available methods and enumerated types of the NdbOperation class:

Figure 2.21 NdbOperation

Public methods and types of the NdbOperation class.


For more information about the use of NdbOperation, see Section, “Single-row operations”.