Documentation Home
MySQL NDB Cluster API Developer Guide
Download this Manual

2.3.30.25 NdbTransaction::scanTable()

Description.  This method performs a table scan, using an NdbRecord object to read out column data.

Signature. 

NdbScanOperation* scanTable
    (
      const NdbRecord* result_record,
      NdbOperation::LockMode lock_mode = NdbOperation::LM_Read,
      const unsigned char* result_mask = 0,
      Uint32 scan_flags = 0,
      Uint32 parallel = 0,
      Uint32 batch = 0
    )

Parameters.  The scanTable() method takes the following parameters:

  • A pointer to an NdbRecord for storing the result. This result_record must remain valid until after the execute() call has been made.

  • The lock_mode in effect for the operation. See Section 2.3.25.15, “NdbOperation::LockMode”, for permitted values and other information.

  • The result_mask pointer is optional. If it is present, only columns for which the corresponding bit (by attribute ID order) in result_mask is set will be retrieved in the scan. The result_mask is copied internally, so in contrast to result_record need not be valid when execute() is invoked.

  • scan_flags can be used to impose ordering and sorting conditions for scans. See Section 2.3.29.9, “NdbScanOperation::ScanFlag”, for a list of permitted values.

  • The parallel argument is the desired parallelism, or 0 for maximum parallelism (receiving rows from all fragments in parallel), which is the default.

  • batch determines whether batching is employed. The default is 0 (off).

Return value.  A pointer to the NdbScanOperation representing this scan. The operation can be checked for errors if necessary.


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.