This section provides information about the
Object class, which contains meta-information
about database objects such as tables and indexes.
Object subclasses model these and other database
objects.
- Parent class
- Child classes
Datafile,Event,Index,LogfileGroup,Table,Tablespace,Undofile,HashMap,ForeignKey- Methods
-
The following table lists the public methods of the
Objectclass and the purpose or use of each method:Table 2.71 Object class methods and descriptions
Name Description getObjectId()Gets an object's ID getObjectStatus()Gets an object's status getObjectVersion()Gets the version of an object All 3 of these methods are pure virtual methods, and are reimplemented in the
Table,Index, andEventsubclasses where needed. - Types
-
These are the public types of the
Objectclass:Table 2.72 Object class types and descriptions
Name Description FragmentTypeFragmentation type used by the object (a table or index) StateThe object's state (whether it is usable) StatusThe object's state (whether it is available) StoreWhether the object has been temporarily or permanently stored TypeThe object's type (what sort of table, index, or other database object the Objectrepresents)
This section provides information about the
FragmentType type, which describes the
fragmentation type of an instance of
Object.
- Description
This parameter specifies how data in the table or index is distributed among the cluster's data nodes, that is, the number of fragments per node. The larger the table, the larger the number of fragments that should be used. Note that all fragment replicas count as a single fragment. For a table, the default is
FragAllMedium. For a unique hash index, the default is taken from the underlying table and cannot currently be changed.- Enumeration values
-
Possible values for
FragmentTypeare shown, along with descriptions, in the following table:Table 2.73 FragmentType values and descriptions
Name Description FragUndefinedThe fragmentation type is undefined or the default FragAllMediumTwo fragments per node FragAllLargeFour fragments per node DistrKeyHashDistributed hash key DistrKeyLinDistributed linear hash key UserDefinedUser defined HashMapPartitionHash map partition
- Description
This method retrieves the object's ID.
- Signature
virtual int getObjectId ( void ) const- Parameters
None.
- Return value
The object ID, an integer.
- Description
The method gets the current version of the object.
- Signature
virtual int getObjectVersion ( void ) const- Parameters
None.
- Return value
The object's version number, an integer.
This section provides information about the
PartitionBalance data type.
- Description
This type enumerates partition balance settings (fragment count types) from which to choose when using
setPartitionBalance(). This is also the type returned bygetPartitionBalance()- Enumeration values
-
Possible values for
PartitionBalanceare shown, along with descriptions, in the following table:Table 2.74 Object::PartitionBalance data type values and descriptions
Name Description PartitionBalance_ForRPByLDMUse one fragment per LDM per node PartitionBalance_ForRAByLDMUse one fragment per LDM per node group PartitionBalance_ForRPByNodeUse one fragment per node PartitionBalance_ForRAByNodeUse one fragment per node group PartitionBalance_SpecificUse setting determined by setPartitionBalance()
In NDB 7.4 and earlier, this was known as
FragmentCountType, and could take one of the
values FragmentCount_OnePerLDMPerNode,
FragmentCount_OnePerLDMPerNodeGroup,
FragmentCount_OnePerNode,
FragmentCount_OnePerNodeGroup, or
FragmentCount_Specific. These values correspond
to those shown in the previous table, in the order shown.
This section provides information about the
State type, which models the state of the
Object.
- Description
This parameter provides us with the object's state. By state, we mean whether or not the object is defined and is in a usable condition. The numeric values are used in the
statecolumns of thedict_obj_infoandhash_mapstables in thendbinfoinformation database.- Enumeration values
-
Possible values for
Stateare shown, along with descriptions, in the following table:Table 2.75 Object State type values and descriptions
ID Name Description 1 StateUndefinedUndefined StateOfflineOffline, not useable 2 StateBuildingBuilding (e.g. restore?), not useable(?) 3 StateDroppingGoing offline or being dropped; not usable 4 StateOnlineOnline, usable 5 StateBackupOnline, being backed up, usable 6 StateBrokenBroken; should be dropped and re-created
This section provides information about the
Status type, which models the status of an
Object.
- Description
Reading an object's
Statustells whether or not it is available in theNDBkernel.- Enumeration values
-
Possible values for
Statusare shown, along with descriptions, in the following table:Table 2.76 Object Status data type values and descriptions
Name Description NewThe object exists only in memory, and has not yet been created in the NDBkernelChangedThe object has been modified in memory, and must be committed in the NDBKernel for changes to take effectRetrievedThe object exists, and has been read into main memory from the NDBKernelInvalidThe object has been invalidated, and should no longer be used AlteredThe table has been altered in the NDBkernel, but is still available for use
This section provides information about the
Store type, which describes the persistence of
an Object.
- Description
Reading this value tells us is the object is temporary or permanent.
- Enumeration values
-
Possible values for
Storeare shown, along with descriptions, in the following table:Table 2.77 Object Store data type values and descriptions
Name Description StoreUndefinedThe object is undefined StoreTemporaryTemporary storage; the object or data will be deleted on system restart StorePermanentThe object or data is permanent; it has been logged to disk
This section provides information about the
Type type.
- Description
The
Typeof the object can be one of several different sorts of index, trigger, tablespace, and so on.- Enumeration values
-
Possible values for
Typeare shown, along with descriptions, in the following table:Table 2.78 Object Type data type values and descriptions
Name Description TypeUndefinedUndefined SystemTableSystem table UserTableUser table (may be temporary) UniqueHashIndexUnique (but unordered) hash index OrderedIndexOrdered (but not unique) index HashIndexTriggerIndex maintenance (internal) IndexTriggerIndex maintenance (internal) SubscriptionTriggerBackup or replication (internal) ReadOnlyConstraintTrigger (internal) TablespaceTablespace LogfileGroupLog file group DatafileData file UndofileUndo file ReorgTriggerTrigger HashMapHash map ForeignKeyForeign key FKParentTriggerTrigger on a foreign key's parent table FKChildTriggerTrigger on a foreign key's child table
For more information about ForeignKey,
FKParentTrigger, and
FKChildTrigger, see
Section 2.3.6, “The ForeignKey Class”.