2.3.25.1 NdbRecAttr Methods

2.3.25.1.1 ~NdbRecAttr()
2.3.25.1.2 NdbRecAttr::aRef()
2.3.25.1.3 NdbRecAttr::char_value()
2.3.25.1.4 NdbRecAttr::clone()
2.3.25.1.5 NdbRecAttr::double_value()
2.3.25.1.6 NdbRecAttr::float_value()
2.3.25.1.7 NdbRecAttr::get_size_in_bytes()
2.3.25.1.8 NdbRecAttr::getColumn()
2.3.25.1.9 NdbRecAttr::getType()
2.3.25.1.10 NdbRecAttr::int8_value()
2.3.25.1.11 NdbRecAttr::int32_value()
2.3.25.1.12 NdbRecAttr::int64_value()
2.3.25.1.13 NdbRecAttr::isNULL()
2.3.25.1.14 NdbRecAttr::medium_value()
2.3.25.1.15 NdbRecAttr::short_value()
2.3.25.1.16 NdbRecAttr::u_8_value()
2.3.25.1.17 NdbRecAttr::u_32_value()
2.3.25.1.18 NdbRecAttr::u_64_value()
2.3.25.1.19 NdbRecAttr::u_char_value()
2.3.25.1.20 NdbRecAttr::u_medium_value()
2.3.25.1.21 NdbRecAttr::u_short_value()

Abstract

This section lists and describes the public methods of the NdbRecAttr class.

Constructor and Destructor.  The NdbRecAttr class has no public constructor; an instance of this object is created using NdbTransaction::execute(). The destructor method, which is public, is discussed in Section 2.3.25.1.1, “~NdbRecAttr().

2.3.25.1.1 ~NdbRecAttr()

Description.  The NdbRecAttr class destructor method.

Important

You should delete only copies of NdbRecAttr objects that were created in your application using the clone() method.

Signature. 

~NdbRecAttr
    (
      void
    )

Parameters.  None.

Return value.  None.

2.3.25.1.2 NdbRecAttr::aRef()

Description.  This method is used to obtain a reference to an attribute value, as a char pointer. This pointer is aligned appropriately for the data type. The memory is released by the NDB API when NdbTransaction::close() is executed on the transaction which read the value.

Signature. 

char* aRef
    (
      void
    ) const

Parameters.  A pointer to the attribute value. Because this pointer is constant, this method can be called anytime after NdbOperation::getValue() has been called.

Return value.  None.

2.3.25.1.3 NdbRecAttr::char_value()

Description.  This method gets a Char value stored in an NdbRecAttr object, and returns it as a char.

Signature. 

char char_value
    (
      void
    ) const

Parameters.  None.

Return value.  A char value.

2.3.25.1.4 NdbRecAttr::clone()

Description.  This method creates a deep copy of an NdbRecAttr object.

Note

The copy created by this method should be deleted by the application when no longer needed.

Signature. 

NdbRecAttr* clone
    (
      void
    ) const

Parameters.  None.

Return value.  An NdbRecAttr object. This is a complete copy of the original, including all data.

2.3.25.1.5 NdbRecAttr::double_value()

Description.  This method gets a Double value stored in an NdbRecAttr object, and returns it as a double.

Signature. 

double double_value
    (
      void
    ) const

Parameters.  None.

Return value.  A double (8 bytes).

2.3.25.1.6 NdbRecAttr::float_value()

Description.  This method gets a Float value stored in an NdbRecAttr object, and returns it as a float.

Signature. 

float float_value
    (
      void
    ) const

Parameters.  None.

Return value.  A float (4 bytes).

2.3.25.1.7 NdbRecAttr::get_size_in_bytes()

Description.  You can use this method to obtain the size of an attribute (element).

Signature. 

Uint32 get_size_in_bytes
    (
      void
    ) const

Parameters.  None.

Return value.  The attribute size in bytes, as an unsigned 32-bit integer.

2.3.25.1.8 NdbRecAttr::getColumn()

Description.  This method is used to obtain the column to which the attribute belongs.

Signature. 

const NdbDictionary::Column* getColumn
    (
      void
    ) const

Parameters.  None.

Return value.  A pointer to a Column object.

2.3.25.1.9 NdbRecAttr::getType()

Description.  This method is used to obtain the column's data type.

Signature. 

NdbDictionary::Column::Type getType
    (
      void
    ) const

Parameters.  None.

Return value.  An Column::Type value.

2.3.25.1.10 NdbRecAttr::int8_value()

Description.  This method gets a Small value stored in an NdbRecAttr object, and returns it as an 8-bit signed integer.

Signature. 

Int8 int8_value
    (
      void
    ) const

Parameters.  None.

Return value.  An 8-bit signed integer.

2.3.25.1.11 NdbRecAttr::int32_value()

Description.  This method gets an Int value stored in an NdbRecAttr object, and returns it as a 32-bit signed integer.

Signature. 

Int32 int32_value
    (
      void
    ) const

Parameters.  None.

Return value.  A 32-bit signed integer.

2.3.25.1.12 NdbRecAttr::int64_value()

Description.  This method gets a Bigint value stored in an NdbRecAttr object, and returns it as a 64-bit signed integer.

Signature. 

Int64 int64_value
    (
      void
    ) const

Parameters.  None.

Return value.  A 64-bit signed integer.

2.3.25.1.13 NdbRecAttr::isNULL()

Description.  This method checks whether an attribute value is NULL.

Signature. 

int isNULL
    (
      void
    ) const

Parameters.  None.

Return value.  One of the following three values:

  • -1: The attribute value is not defined due to an error.

  • 0: The attribute value is defined, but is not NULL.

  • 1: The attribute value is defined and is NULL.

Important

In the event that NdbTransaction::execute() has not yet been called, the value returned by isNULL() is not determined.

2.3.25.1.14 NdbRecAttr::medium_value()

Description.  Gets the value of a Mediumint value stored in an NdbRecAttr object, and returns it as a 32-bit signed integer.

Signature. 

Int32 medium_value
    (
      void
    ) const

Parameters.  None.

Return value.  A 32-bit signed integer.

2.3.25.1.15 NdbRecAttr::short_value()

Description.  This method gets a Smallint value stored in an NdbRecAttr object, and returns it as a 16-bit signed integer (short).

Signature. 

short short_value
    (
      void
    ) const

Parameters.  None.

Return value.  A 16-bit signed integer.

2.3.25.1.16 NdbRecAttr::u_8_value()

Description.  This method gets a Smallunsigned value stored in an NdbRecAttr object, and returns it as an 8-bit unsigned integer.

Signature. 

Uint8 u_8_value
    (
      void
    ) const

Parameters.  None.

Return value.  An 8-bit unsigned integer.

2.3.25.1.17 NdbRecAttr::u_32_value()

Description.  This method gets an Unsigned value stored in an NdbRecAttr object, and returns it as a 32-bit unsigned integer.

Signature. 

Uint32 u_32_value
    (
      void
    ) const

Parameters.  None.

Return value.  A 32-bit unsigned integer.

2.3.25.1.18 NdbRecAttr::u_64_value()

Description.  This method gets a Bigunsigned value stored in an NdbRecAttr object, and returns it as a 64-bit unsigned integer.

Signature. 

Uint64 u_64_value
    (
      void
    ) const

Parameters.  None.

Return value.  A 64-bit unsigned integer.

2.3.25.1.19 NdbRecAttr::u_char_value()

Description.  This method gets a Char value stored in an NdbRecAttr object, and returns it as an unsigned char.

Signature. 

Uint8 u_char_value
    (
      void
    ) const

Parameters.  None.

Return value.  An 8-bit unsigned char value.

2.3.25.1.20 NdbRecAttr::u_medium_value()

Description.  This method gets an Mediumunsigned value stored in an NdbRecAttr object, and returns it as a 32-bit unsigned integer.

Signature. 

Uint32 u_medium_value
    (
      void
    ) const

Parameters.  None.

Return value.  A 32-bit unsigned integer.

2.3.25.1.21 NdbRecAttr::u_short_value()

Description.  This method gets a Smallunsigned value stored in an NdbRecAttr object, and returns it as a 16-bit (short) unsigned integer.

Signature. 

Uint16 u_short_value
    (
      void
    ) const

Parameters.  None.

Return value.  A short (16-bit) unsigned integer.