Documentation Home
MySQL NDB Cluster API Developer Guide
Download this Manual

2.3.3 The Datafile Class


This section covers the Datafile class.

Parent class.  Object

Child classes.  None

Description.  The Datafile class models a Cluster Disk Data datafile, which is used to store Disk Data table data.


Currently, only unindexed column data can be stored on disk. Indexes and indexed columns are stored in memory.

NDB Cluster prior to MySQL 5.1 did not support Disk Data storage and so did not support datafiles; thus the Datafile class is unavailable for NDB API applications written against these older releases.

Methods.  The following table lists the public methods of this class and the purpose or use of each method:

Table 2.11 Datafile class methods and descriptions

Name Description
Datafile() Class constructor
~Datafile() Destructor
getFileNo() Removed in NDB 7.5.0 (Bug #47960, Bug #11756088)
getFree() Gets the amount of free space in the datafile
getNode() Removed in NDB 7.5.0 (Bug #47960, Bug #11756088)
getObjectId() Gets the datafile's object ID
getObjectStatus() Gets the datafile's object status
getObjectVersion() Gets the datafile's object version
getPath() Gets the file system path to the datafile
getSize() Gets the size of the datafile
getTablespace() Gets the name of the tablespace to which the datafile belongs
getTablespaceId() Gets the ID of the tablespace to which the datafile belongs
setNode() Removed in NDB 7.5.0 (Bug #47960, Bug #11756088)
setPath() Sets the name and location of the datafile on the file system
setSize() Sets the datafile's size
setTablespace() Sets the tablespace to which the datafile belongs

Types.  The Datafile class defines no public types.