Documentation Home
MySQL NDB Cluster API Developer Guide
Download this Manual

2.3.29.2 NdbScanOperation::deleteCurrentTuple()

Description.  This method is used to delete the current tuple.

Signature. 

const NdbOperation* deleteCurrentTuple
    (
      NdbTransaction* takeOverTrans,
      const NdbRecord* record,
      char* row = 0,
      const unsigned char* mask = 0,
      const NdbOperation::OperationOptions* opts = 0,
      Uint32 sizeOfOpts = 0
    )

For more information, see Section 2.3.27, “The NdbRecord Interface”.

Parameters.  When used with the NdbRecord interface, this method takes the parameters listed here:

  • The transaction (takeOverTrans) that should perform the lock; when using NdbRecord with scans, this parameter is not optional.

  • The NdbRecord referenced by the scan. This record value is required, even if no records are being read.

  • The row from which to read. Set this to NULL if no read is to occur.

  • The mask pointer is optional. If it is present, then only columns for which the corresponding bit in the mask is set are retrieved by the scan.

  • OperationOptions (opts) can be used to provide more finely-grained control of operation definitions. An OperationOptions structure is passed with flags indicating which operation definition options are present. Not all operation types support all operation options; the options supported for each type of operation are shown in the following table:

    Operation type (Method) OperationOptions Flags Supported
    readTuple() OO_ABORTOPTION, OO_GETVALUE, OO_PARTITION_ID, OO_INTERPRETED
    insertTuple() OO_ABORTOPTION, OO_SETVALUE, OO_PARTITION_ID, OO_ANYVALUE
    updateTuple() OO_ABORTOPTION, OO_SETVALUE, OO_PARTITION_ID, OO_INTERPRETED, OO_ANYVALUE
    writeTuple() OO_ABORTOPTION, OO_SETVALUE, OO_PARTITION_ID, OO_ANYVALUE
    deleteTuple() OO_ABORTOPTION, OO_GETVALUE, OO_PARTITION_ID, OO_INTERPRETED, OO_ANYVALUE
  • The optional sizeOfOptions parameter is used to preserve backward compatibility of this interface with previous definitions of the OperationOptions structure. If an unusual size is detected by the interface implementation, it can use this to determine how to interpret the passed OperationOptions structure. To enable this functionality, the caller should pass sizeof(NdbOperation::OperationOptions) for the value of this argument.

  • If options are specified, their length (sizeOfOpts) must be specified as well.

Return value.  Returns 0 on success, or -1 on failure.


User Comments
Sign Up Login You must be logged in to post a comment.