NdbDictionary::getEmptyBitmask()NdbDictionary::getFirstAttrId()NdbDictionary::getNextAttrId()NdbDictionary::getNullBitOffset()NdbDictionary::getOffset()NdbDictionary::getRecordIndexName()NdbDictionary::getRecordRowLength()NdbDictionary::getRecordTableName()NdbDictionary::getRecordType()NdbDictionary::getValuePtr()NdbDictionary::isNull()NdbDictionary::setNull()Description.
Returns an empty column presence bitmask which can be used
with any NdbRecord to specify
that no NdbRecord columns are
to be included in the operation.
Signature.
static const unsigned char* getEmptyBitmask
(
void
)Parameters. None.
Return value. An empty bitmask.
Description.
Get the first attribute ID specified by an
NdbRecord object. Returns
false if no attribute ID is specified.
Signature.
static bool getFirstAttrId
(
const NdbRecord* record,
Uint32& firstAttrId
)
Parameters.
A pointer to an NdbRecord and
a reference to the attribute
(firstAttrID).
Return value.
Boolean false, when no attribute ID can be
obtained.
Description.
Get the next attribute ID specified by an
NdbRecord object following
the attribute ID passed in. Returns false
when there are no more attribute IDs to be returned.
Signature.
static bool getNextAttrId
(
const NdbRecord* record,
Uint32& attrId
)
Parameters.
A pointer to an NdbRecord and
a reference to an attribute ID.
Return value.
Boolean false, when no attribute ID can be
obtained.
Description.
Get the offset of the given attribute ID's null bit from the
start of the NdbRecord row.
Returns false if the attribute ID is not
present.
Signature.
static bool getNullBitOffset
(
const NdbRecord* record,
Uint32 attrId,
Uint32& bytes,
Uint32& bit
)
Parameters.
An NdbRecord
record in which to get the null bit
offset of the given attribute ID
(attrId). The offset is expressed
as a number of bytes (bytes) plus a
number of bits within the last byte
(bit).
Return value.
Boolean false, if the attribute with the
given ID is not present.
Description.
Get the offset of the given attribute ID's storage from the
start of the NdbRecord row.
Returns false if the attribute id is not
present
Signature.
static bool getOffset
(
const NdbRecord* record,
Uint32 attrId,
Uint32& offset
)
Parameters.
The offset of the given attribute
ID's storage from the start of the
NdbRecord row.
Return value.
Boolean false, if no attribute ID can be
found.
Description.
Get the name of the Index
object that the NdbRecord
refers to.
If the NdbRecord object is not
an IndexAccess
NdbRecord, the method returns
null.
Signature.
static const char* getRecordIndexName
(
const NdbRecord* record
)
Parameters.
A pointer to the NdbRecord
for which to get the name.
Return value.
The name, if any. Otherwise, or if the
NdbRecord object is not of
the IndexAccess type, this method returns
null.
Description.
Get the number of bytes needed to store one row of data laid
out as described by the
NdbRecord structure passed in
to this method.
Signature.
static Uint32 getRecordRowLength
(
const NdbRecord* record
)
Parameters.
An NdbRecord object.
Return value. The number of bytes needed per row.
Description.
Return the name of the table object that the
NdbRecord refers to. This
method returns null if the record is not a
TableAccess.
Signature.
static const char* getRecordTableName
(
const NdbRecord* record
)
Parameters.
The record
(NdbRecord object) for which
to get the table name.
Return value.
The name of the table, or null if the
NdbRecord object' type
is not TableAccess.
Description.
Return the type of the
NdbRecord object passed.
Signature.
static RecordType getRecordType
(
const NdbRecord* record
)Parameters.
An NdbRecord object.
Return value.
The RecordType of the
NdbRecord
(IndexAccess or
TableAccess).
Description. Returns a pointer to the beginning of stored data specified by attribute ID, by looking up the offset of the column stored in the NdbRecord object and returning the sum of the row position and the offset.
This method provides both row-const and non-row-const versions.
Signature.
static const char* getValuePtr
(
const NdbRecord* record,
const char* row,
Uint32 attrId
)
static char* getValuePtr
(
const NdbRecord* record,
char* row,
Uint32 attrId
)
Parameters.
A pointer to an NdbRecord
object describing the row format, a pointer to the start of
the row data (const in the const version of
this method), and the attribute ID of the column,
Return value. A pointer to the start of the attribute in the row. This is null if the attribute is not part of the NdbRecord definition.
Description.
Indicate whether the null bit for the given column is set to
true or false. The
location of the null bit in relation to the row pointer is
obtained from the passed
NdbRecord object. If the
column is not nullable, or if the column is not part of the
NdbRecord definition, the
method returns false.
Signature.
static bool isNull
(
const NdbRecord* record,
const char* row,
Uint32 attrId
)
Parameters.
A pointer to an NdbRecord
object describing the row format, a pointer to the start of
the row data, and the attribute ID of the column to check.
Return value.
Boolean true if the attribute ID exists in
this NdbRecord, is nullable,
and this row's null bit is set; otherwise, Boolean
false.
Description.
Set the null bit for the given column to the supplied value.
The offset for the null bit is obtained from the passed
NdbRecord object. If the
attribute ID is not part of the
NdbRecord, or if it is not
nullable, this method returns an error (-1).
Signature.
static int setNull
(
const NdbRecord* record,
char* row,
Uint32 attrId,
bool value
)
Parameters.
A pointer to the record
(NdbRecord object) describing
the row format; a pointer to the start of the
row data; the attribute ID of the
column (attrId); and the
value to set the null bit to
(true or false).
Return value.
Returns 0 on success; returns -1 if the
attrId is not part of the
record, or is not nullable.