Documentation Home
MySQL NDB Cluster API Developer Guide
Download this Manual

2.3.17.1 Ndb_cluster_connection Class Constructor

Description.  This method creates a connection to an NDB Cluster, that is, to a cluster of data nodes. The object returned by this method is required in order to instantiate an Ndb object. Thus, every NDB API application requires the use of an Ndb_cluster_connection.

Ndb_cluster_connection has two constructors. The first of these is shown here:

Signature. 

Ndb_cluster_connection
    (
      const char* connection_string = 0
    )

Parameters.  This version of the constructor requires a single connection_string parameter, pointing to the location of the management server.

The second constructor takes a node ID in addition to the connection string argument. Its signature and parameters are shown here:

Signature. 

Ndb_cluster_connection
    (
      const char* connection_string,
      int force_api_nodeid
    )

Parameters.  This version of the constructor takes two arguments, a connection_string and the node ID (force_api_nodeid) to be used by this API node. This node ID overrides any node ID value set in the connection_string argument.

Return value.  (Both versions:) An instance of Ndb_cluster_connection.


User Comments
User comments in this section are, as the name implies, provided by MySQL users. The MySQL documentation team is not responsible for, nor do they endorse, any of the information provided here.
Sign Up Login You must be logged in to post a comment.