Documentation Home
MySQL NDB Cluster API Developer Guide
Download this Manual

2.3.25 The NdbOperation Class

Abstract

This section discusses the NdbOperation class.

Parent class.  None

Child classes.  NdbIndexOperation, NdbScanOperation

Description.  NdbOperation represents a generic data operation. Its subclasses represent more specific types of operations. See Section 2.3.25.18, “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:

Table 2.48 NdbOperation class methods and descriptions

Name Description
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

Note

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:

Table 2.49 NdbOperation class types and descriptions

Name Description
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

Note

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


User Comments
User comments in this section are, as the name implies, provided by MySQL users. The MySQL documentation team is not responsible for, nor do they endorse, any of the information provided here.
Sign Up Login You must be logged in to post a comment.