MySQL NDB Cluster API Developer Guide

2.3.35 The ScanOptions Structure

Parent class.  NdbScanOperation

Description.  This data structure is used to pass options to the NdbRecord-based scanTable() and scanIndex() methods of the NdbTransaction class. Each option type is marked as present by setting the corresponding bit in the optionsPresent field. Only the option types marked in the optionsPresent field need have sensible data.

All data is copied out of the ScanOptions structure (and any subtended structures) at operation definition time. If no options are required, then NULL may be passed as the ScanOptions pointer.

Members.  The elements making up this structure are shown in the following table:

Table 2.84 NdbScanOperation::ScanOptions attributes, with types and descriptions

Name Type Description
optionsPresent Uint64 Which options are present.
[...] Type:
  • SO_SCANFLAGS: 0x01

  • SO_PARALLEL: 0x02

  • SO_BATCH: 0x04

  • SO_GETVALUE: 0x08




  • SO_PARTINFO: 0x80

Type of options.
scan_flags Uint32 Flags controlling scan behavior; see Section, “NdbScanOperation::ScanFlag”, for more information.
parallel Uint32 Scan parallelism; 0 (the default) sets maximum parallelism.
batch Uint32 Batch size for transfers from data nodes to API nodes; 0 (the default) enables this to be selected automatically.
extraGetValues GetValueSpec Extra values to be read for each row matching the sdcan criteria.
numExtraGetValues Uint32 Number of extra values to be read.
partitionId Uint32 Limit the scan to the partition having this ID; alternatively, you can supply an PartitionSpec here. For index scans, partitioning information can be supplied for each range.
interpretedCode NdbInterpretedCode Interpeted code to execute as part of the scan.
customData void* Data pointer to associate with this scan operation.
partitionInfo PartitionSpec Partition information for bounding this scan.
sizeOfPartInfo Uint32 Size of the bounding partition information.

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