#include <NdbRecAttr.hpp>
Public Member Functions | |
| NdbRecAttr * | clone () const |
| ~NdbRecAttr () | |
Getting meta information | |
| const NdbDictionary::Column * | getColumn () const |
| NdbDictionary::Column::Type | getType () const |
| Uint32 | get_size_in_bytes () const |
Getting stored value | |
| int | isNULL () const |
| Int64 | int64_value () const |
| Int32 | int32_value () const |
| Int32 | medium_value () const |
| short | short_value () const |
| char | char_value () const |
| Int8 | int8_value () const |
| Uint64 | u_64_value () const |
| Uint32 | u_32_value () const |
| Uint32 | u_medium_value () const |
| Uint16 | u_short_value () const |
| Uint8 | u_char_value () const |
| Uint8 | u_8_value () const |
| float | float_value () const |
| double | double_value () const |
Getting reference to stored value | |
| char * | aRef () const |
Private Member Functions | |
| Uint32 | attrId () const |
| bool | setNULL () |
| void | setUNDEFINED () |
| bool | receive_data (const Uint32 *, Uint32) |
| void | release () |
| void | init () |
| NdbRecAttr (Ndb *) | |
| void | next (NdbRecAttr *aRecAttr) |
| NdbRecAttr * | next () |
| int | setup (const class NdbDictionary::Column *col, char *aValue) |
| int | setup (const class NdbColumnImpl *anAttrInfo, char *aValue) |
| int | setup (Uint32 byteSize, char *aValue) |
| bool | copyoutRequired () const |
| void | copyout () |
| NdbRecAttr (const NdbRecAttr &) | |
| NdbRecAttr & | operator= (const NdbRecAttr &) |
Private Attributes | |
| Uint64 | theStorage [4] |
| Uint64 * | theStorageX |
| char * | theValue |
| void * | theRef |
| NdbRecAttr * | theNext |
| Uint32 | theAttrId |
| Int32 | m_size_in_bytes |
| const NdbDictionary::Column * | m_column |
| Uint16 * | m_getVarValue |
Friends | |
| struct | Ndb_free_list_t< NdbRecAttr > |
NdbRecAttr objects are used to store the attribute value after retrieving the value from the NDB Cluster using the method NdbOperation::getValue. The objects are allocated by the NDB API. An example application program follows:
MyRecAttr = MyOperation->getValue("ATTR2", NULL); if (MyRecAttr == NULL) goto error; if (MyTransaction->execute(Commit) == -1) goto error; ndbout << MyRecAttr->u_32_value();
To get a reference to the value, there are two methods: NdbRecAttr::aRef (memory is released by NDB API) and NdbRecAttr::getAttributeObject (memory must be released by application program). The two methods may return different pointers.
There are also methods to check attribute type, attribute size and array size. The method NdbRecAttr::arraySize returns the number of elements in the array (where each element is of size given by NdbRecAttr::attrSize). The NdbRecAttr::arraySize method is needed when reading variable-sized attributes.
| NdbRecAttr::~NdbRecAttr | ( | ) |
Destructor
| NdbRecAttr::NdbRecAttr | ( | Ndb * | ) | [private] |
| NdbRecAttr::NdbRecAttr | ( | const NdbRecAttr & | ) | [private] |
| char* NdbRecAttr::aRef | ( | ) | const |
Get reference to attribute value.
Returns a char*-pointer to the value. The pointer is aligned appropriately for the data type. The memory is released when Ndb::closeTransaction is executed for the transaction which read the value.
The pointer to the attribute value stored in an NdbRecAttr object (i.e. the pointer returned by aRef) is constant. This means that this method can be called anytime after NdbOperation::getValue has been called.
| Uint32 NdbRecAttr::attrId | ( | ) | const [private] |
| char NdbRecAttr::char_value | ( | ) | const |
| NdbRecAttr* NdbRecAttr::clone | ( | ) | const |
Make a copy of RecAttr object including all data.
| void NdbRecAttr::copyout | ( | ) | [private] |
| bool NdbRecAttr::copyoutRequired | ( | ) | const [private] |
| double NdbRecAttr::double_value | ( | ) | const |
| float NdbRecAttr::float_value | ( | ) | const |
| Uint32 NdbRecAttr::get_size_in_bytes | ( | ) | const [inline] |
Get attribute (element) size in bytes.
| const NdbDictionary::Column* NdbRecAttr::getColumn | ( | ) | const |
| NdbDictionary::Column::Type NdbRecAttr::getType | ( | ) | const |
Get type of column
| void NdbRecAttr::init | ( | ) | [private] |
| Int32 NdbRecAttr::int32_value | ( | ) | const |
| Int64 NdbRecAttr::int64_value | ( | ) | const |
| Int8 NdbRecAttr::int8_value | ( | ) | const |
| int NdbRecAttr::isNULL | ( | ) | const |
Check if attribute value is NULL.
| Int32 NdbRecAttr::medium_value | ( | ) | const |
| NdbRecAttr* NdbRecAttr::next | ( | ) | [private] |
| void NdbRecAttr::next | ( | NdbRecAttr * | aRecAttr | ) | [private] |
| NdbRecAttr& NdbRecAttr::operator= | ( | const NdbRecAttr & | ) | [private] |
| bool NdbRecAttr::receive_data | ( | const Uint32 * | , | |
| Uint32 | ||||
| ) | [private] |
| void NdbRecAttr::release | ( | ) | [private] |
| bool NdbRecAttr::setNULL | ( | ) | [private] |
| void NdbRecAttr::setUNDEFINED | ( | ) | [private] |
| int NdbRecAttr::setup | ( | Uint32 | byteSize, | |
| char * | aValue | |||
| ) | [private] |
| int NdbRecAttr::setup | ( | const class NdbColumnImpl * | anAttrInfo, | |
| char * | aValue | |||
| ) | [private] |
| int NdbRecAttr::setup | ( | const class NdbDictionary::Column * | col, | |
| char * | aValue | |||
| ) | [private] |
| short NdbRecAttr::short_value | ( | ) | const |
| Uint32 NdbRecAttr::u_32_value | ( | ) | const |
| Uint64 NdbRecAttr::u_64_value | ( | ) | const |
| Uint8 NdbRecAttr::u_8_value | ( | ) | const |
| Uint8 NdbRecAttr::u_char_value | ( | ) | const |
| Uint32 NdbRecAttr::u_medium_value | ( | ) | const |
| Uint16 NdbRecAttr::u_short_value | ( | ) | const |
friend struct Ndb_free_list_t< NdbRecAttr > [friend] |
const NdbDictionary::Column* NdbRecAttr::m_column [private] |
Uint16* NdbRecAttr::m_getVarValue [private] |
Int32 NdbRecAttr::m_size_in_bytes [private] |
Uint32 NdbRecAttr::theAttrId [private] |
NdbRecAttr* NdbRecAttr::theNext [private] |
void* NdbRecAttr::theRef [private] |
Uint64 NdbRecAttr::theStorage[4] [private] |
Uint64* NdbRecAttr::theStorageX [private] |
char* NdbRecAttr::theValue [private] |
Based on MySQL Cluster 7.0.10.
This page is for information only and is not maintained by MySQL or Sun Microsystems - use at your own risk. For an upto date view of the API refer to the header files included with your MySQL Cluster distribution or check the MySQL Cluster API Developer Guide.