2.3.24.1 NdbOperation Types

2.3.24.1.1 The NdbOperation::AbortOption Type
2.3.24.1.2 The NdbOperation::LockMode Type
2.3.24.1.3 The NdbOperation::Type Type

Abstract

This section details the public types belonging to the NdbOperation class.

2.3.24.1.1 The NdbOperation::AbortOption Type

Description.  This type is used to determine whether failed operations should force a transaction to be aborted. It is used as an argument to the execute() method—see Section 2.3.29.2.4, “NdbTransaction::execute()”, for more information.

Enumeration values.  Possible values are shown, along with descriptions, in the following table:

ValueDescription
AbortOnErrorA failed operation causes the transaction to abort.
AO_IgnoreOnErrorFailed operations are ignored; the transaction continues to execute.
DefaultAbortOptionThe AbortOption value is set according to the operation type:
  • Read operations: AO_IgnoreOnError

  • Scan takeover or DML operations: AbortOnError

DefaultAbortOperation is available beginning with MySQL Cluster NDB 6.2.0. See Section 2.3.29.2.4, “NdbTransaction::execute()”, for more information.

Important

Previous to MySQL Cluster NDB 6.2.0, this type belonged to the NdbTransaction class.

2.3.24.1.2 The NdbOperation::LockMode Type

Description.  This type describes the lock mode used when performing a read operation.

Enumeration values.  Possible values for this type are shown, along with descriptions, in the following table:

ValueDescription
LM_ReadRead with shared lock
LM_ExclusiveRead with exclusive lock
LM_CommittedReadIgnore locks; read last committed
LM_SimpleReadRead with shared lock, but release lock directly
Note

There is also support for dirty reads (LM_Dirty), but this is normally for internal purposes only, and should not be used for applications deployed in a production setting.

2.3.24.1.3 The NdbOperation::Type Type

Description.  Type is used to describe the operation access type. Each access type is supported by NdbOperation or one of its subclasses, as shown in the following table:

Enumeration values.  Possible values are shown, along with descriptions, in the following table:

ValueDescriptionClass
PrimaryKeyAccessA read, insert, update, or delete operation using the table's primary keyNdbOperation
UniqueIndexAccessA read, update, or delete operation using a unique indexNdbIndexOperation
TableScanA full table scanNdbScanOperation
OrderedIndexScanAn ordered index scanNdbIndexScanOperation