Documentation Home
MySQL NDB Cluster API Developer Guide
Download this Manual

2.3.6.1 Event::addEventColumn()

Description.  This method is used to add a column on which events should be detected. The column may be indicated either by its ID or its name.

Important

You must invoke Dictionary::createEvent() before any errors will be detected. See Section 2.3.4.4, “Dictionary::createEvent()”.

Note

If you know several columns by name, you can enable event detection on all of them at one time by using addEventColumns(). See Section 2.3.6.2, “Event::addEventColumns()”.

Signature.  Identifying the event using its column ID:

void addEventColumn
    (
      unsigned attrId
    )

Identifying the column by name:

void addEventColumn
    (
      const char* columnName
    )

Parameters.  This method takes a single argument, which may be either one of the following:

  • The column ID (attrId), which should be an integer greater than or equal to 0, and less than the value returned by getNoOfEventColumns().

  • The column's name (as a constant character pointer).

Return value.  None.