Documentation Home
MySQL NDB Cluster API Developer Guide
Download this Manual

2.3.24.47 NdbInterpretedCode::write_attr()

Description.  This method is used to copy a register value to a table column. The column may be specified either by using its attribute ID or as a pointer to a Column object.

Signature.  This method can be invoked in either of two ways. The first of these is requires referencing the column by its attribute ID, as shown here:

int read_attr
    (
      Uint32 attrId,
      Uint32 RegSource
    )

You can also reference the column as a Column object instead, like this:

int read_attr
    (
      const NdbDictionary::Column* column,
      Uint32 RegSource
    )

Parameters.  This method takes two parameters as follows:

  • A reference to the table column to which the register value is to be copied. This can be either of the following:

    • The table column's attribute ID (attrId)

    • A pointer to a column—that is, a pointer to an Column object referencing the table column

  • The register whose value is to be copied (RegSource).

Return value.  Returns 0 on success; -1 on failure.