This method defines the retrieval of an attribute value. The NDB
API allocates memory for the
NdbRecAttr object that is to
hold the returned attribute value.
This method does not fetch the attribute
value from the database, and the
NdbRecAttr object returned by
this method is not readable or printable before calling the
returned a non-
value Buffer Memory Allocation.
It is the application's responsibility to allocate
sufficient memory for the
buffer (if not
NULL), and this buffer must be
aligned appropriately. The buffer is used directly (thus
avoiding a copy penalty) only if it is aligned on a 4-byte
boundary and the attribute size in bytes (calculated as
is a multiple of 4.
getValue() retrieves the current value. Use
for retrieving the previous value.
NdbRecAttr* getValue ( const char* name, char* value = 0 )
Parameters. This method takes the two parameters listed here:
nameof the attribute (as a constant character pointer).
A pointer to a
value, such that:
If the attribute value is not
NULL, then the attribute value is returned in this parameter.
If the attribute value is
NULL, then the attribute value is stored only in the
NdbRecAttrobject returned by this method.
valueBuffer Memory Allocation, for more information regarding this parameter.
NdbRecAttr object to hold
the value of the attribute, or a
indicating that an error has occurred.