Documentation Home
MySQL NDB Cluster API Developer Guide
Download this Manual

2.3.30.4 NdbTransaction::deleteTuple()

Description.  Deletes a tuple using NdbRecord.

Signature. 

const NdbOperation* deleteTuple
    (
      const NdbRecord* key_rec,
      const char* key_row,
      const NdbRecord* result_rec,
      char* result_row,
      const unsigned char* result_mask = 0,
      const NdbOperation::OperationOptions* opts = 0,
      Uint32 sizeOfOptions = 0
    )

Parameters.  This method takes the following parameters:

  • key_rec is a pointer to an NdbRecord for either a table or an index. If on a table, then the delete operation uses a primary key; if on an index, then the operation uses a unique key. In either case, the key_rec must include all columns of the key.

  • The key_row passed to this method defines the primary or unique key of the tuple to be deleted, and must remain valid until execute() is called.

  • The result_rec is the NdbRecord to be used.

  • The result_row can be NULL if no attributes are to be returned.

  • The result_mask, if not NULL, defines a subset of attributes to be read and returned to the client. The mask is copied, and so does not need to remain valid after the call to this method returns.

  • 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; for the options supported by each type of operation, see Section 2.3.30.21, “NdbTransaction::readTuple()”.

  • The optional sizeOfOptions parameter provides 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.

Return value.  A const pointer to the NdbOperation representing this write operation. The operation can be checked for errors if necessary.


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