MySQL 5.6.14 Source Code Document
|
Contains value of an attribute. More...
#include <NdbRecAttr.hpp>
Public Member Functions | |
NdbRecAttr * | clone () const |
~NdbRecAttr () | |
const NdbRecAttr * | next () const |
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 |
Friends | |
class | NdbOperation |
class | NdbScanOperation |
class | NdbIndexScanOperation |
class | NdbEventOperationImpl |
class | NdbReceiver |
class | Ndb |
class | NdbQueryOperationImpl |
struct | Ndb_free_list_t< NdbRecAttr > |
class NdbOut & | operator<< (class NdbOut &, const class AttributeS &) |
Contains value of an attribute.
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:
For more examples, see ndbapi_simple.cpp.
For simple types, there are methods which directly getting the value from the NdbRecAttr object.
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.
Definition at line 74 of file NdbRecAttr.hpp.
NdbRecAttr::~NdbRecAttr | ( | ) |
Destructor
Definition at line 32 of file NdbRecAttr.cpp.
|
inline |
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.
Definition at line 423 of file NdbRecAttr.hpp.
|
inline |
Get value stored in NdbRecAttr object.
Definition at line 338 of file NdbRecAttr.hpp.
NdbRecAttr * NdbRecAttr::clone | ( | ) | const |
Make a copy of RecAttr object including all data.
Definition at line 113 of file NdbRecAttr.cpp.
double NdbRecAttr::double_value | ( | ) | const |
Get value stored in NdbRecAttr object.
Definition at line 218 of file NdbRecAttr.cpp.
float NdbRecAttr::float_value | ( | ) | const |
Get value stored in NdbRecAttr object.
Definition at line 210 of file NdbRecAttr.cpp.
|
inline |
Get attribute (element) size in bytes.
Definition at line 104 of file NdbRecAttr.hpp.
|
inline |
Get type of column
Definition at line 312 of file NdbRecAttr.hpp.
|
inline |
Get value stored in NdbRecAttr object.
Definition at line 324 of file NdbRecAttr.hpp.
Int64 NdbRecAttr::int64_value | ( | ) | const |
Get value stored in NdbRecAttr object.
Definition at line 194 of file NdbRecAttr.cpp.
|
inline |
Get value stored in NdbRecAttr object.
Definition at line 345 of file NdbRecAttr.hpp.
|
inline |
Check if attribute value is NULL.
Definition at line 452 of file NdbRecAttr.hpp.
Int32 NdbRecAttr::medium_value | ( | ) | const |
Get value stored in NdbRecAttr object.
Definition at line 226 of file NdbRecAttr.cpp.
|
inline |
Get value stored in NdbRecAttr object.
Definition at line 331 of file NdbRecAttr.hpp.
|
inline |
Get value stored in NdbRecAttr object.
Definition at line 352 of file NdbRecAttr.hpp.
Uint64 NdbRecAttr::u_64_value | ( | ) | const |
Get value stored in NdbRecAttr object.
Definition at line 202 of file NdbRecAttr.cpp.
|
inline |
Get value stored in NdbRecAttr object.
Definition at line 373 of file NdbRecAttr.hpp.
|
inline |
Get value stored in NdbRecAttr object.
Definition at line 366 of file NdbRecAttr.hpp.
Uint32 NdbRecAttr::u_medium_value | ( | ) | const |
Get value stored in NdbRecAttr object.
Definition at line 232 of file NdbRecAttr.cpp.
|
inline |
Get value stored in NdbRecAttr object.
Definition at line 359 of file NdbRecAttr.hpp.
|
friend |
Reciver(s)
Definition at line 82 of file NdbRecAttr.hpp.
|
friend |
Sender(s)
Definition at line 77 of file NdbRecAttr.hpp.