From f7d2037bb70e51b2ad674e74d4bf6ec23a13118c Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 30 Dec 2004 00:44:59 +1000 Subject: Got rid of tags in doxygen comments for mgmapi.h and ndbapi.hpp as they look like crap when converted to PDF. ndb/include/mgmapi/mgmapi.h: Got rid of tags in doxycomments. ndb/include/ndbapi/Ndb.hpp: Got rid of tags in doxycomments. --- ndb/include/mgmapi/mgmapi.h | 4 +-- ndb/include/ndbapi/Ndb.hpp | 88 ++++++++++++++++++++++----------------------- 2 files changed, 45 insertions(+), 47 deletions(-) (limited to 'ndb/include') diff --git a/ndb/include/mgmapi/mgmapi.h b/ndb/include/mgmapi/mgmapi.h index ea406b9ddb9..7f2baecd757 100644 --- a/ndb/include/mgmapi/mgmapi.h +++ b/ndb/include/mgmapi/mgmapi.h @@ -30,9 +30,9 @@ * @section General Concepts * * Each MGM API function needs a management server handle - * of type Mgm_C_Api::NdbMgmHandle. + * of type Mgm_C_Api::NdbMgmHandle. * This handle is initally created by calling the - * function ndb_mgm_create_handle(). + * function ndb_mgm_create_handle(). * * A function can return: * -# An integer value. diff --git a/ndb/include/ndbapi/Ndb.hpp b/ndb/include/ndbapi/Ndb.hpp index 39f6a2a02bd..44a4b96fecf 100644 --- a/ndb/include/ndbapi/Ndb.hpp +++ b/ndb/include/ndbapi/Ndb.hpp @@ -23,31 +23,31 @@ The NDB API is a MySQL Cluster application interface that implements transactions. The NDB API consists of the following fundamental classes: - - Ndb_cluster_connection, representing a connection to a cluster, - - Ndb is the main class, representing the database, - - NdbTransaction represents a transaction, - - NdbOperation represents an operation using a primary key, - - NdbScanOperation represents an operation performing a full table scan. - - NdbIndexOperation represents an operation using a unique hash index, - - NdbIndexScanOperation represents an operation performing a scan using + - Ndb_cluster_connection, representing a connection to a cluster, + - Ndb is the main class, representing the database, + - NdbTransaction represents a transaction, + - NdbOperation represents an operation using a primary key, + - NdbScanOperation represents an operation performing a full table scan. + - NdbIndexOperation represents an operation using a unique hash index, + - NdbIndexScanOperation represents an operation performing a scan using an ordered index, - - NdbRecAttr represents an attribute value - - NdbDictionary represents meta information about tables and attributes. - - NdbError contains the specification for an error. + - NdbRecAttr represents an attribute value + - NdbDictionary represents meta information about tables and attributes. + - NdbError contains the specification for an error. There are also some auxiliary classes. The main structure of an application program is as follows: - -# Construct and connect to a cluster using the Ndb_cluster_connection + -# Construct and connect to a cluster using the Ndb_cluster_connection object. - -# Construct and initialize Ndb object(s). - -# Define and execute transactions using NdbTransaction and Ndb*Operation. - -# Delete Ndb objects + -# Construct and initialize Ndb object(s). + -# Define and execute transactions using NdbTransaction and Ndb*Operation. + -# Delete Ndb objects -# Delete cluster connection The main structure of a transaction is as follows: - -# Start transaction (an NdbTransaction) + -# Start transaction (an NdbTransaction) -# Add and define operations associated with the transaction using - Ndb*Operation + Ndb*Operation -# Execute transaction The execution can be of two different types, @@ -69,41 +69,41 @@ Synchronous transactions are defined and executed as follows: -# Start (create) the transaction, which is - referenced by an NdbTransaction object - (typically created using Ndb::startTransaction()). + referenced by an NdbTransaction object + (typically created using Ndb::startTransaction()). At this point, the transaction is only being defined, and is not yet sent to the NDB kernel. -# Define operations and add them to the transaction, - using NdbTransaction::getNdb*Operation() and - methods of the Ndb*Operation class. + using NdbTransaction::getNdb*Operation() and + methods of the Ndb*Operation class. Note that the transaction has still not yet been sent to the NDB kernel. - -# Execute the transaction, using the NdbTransaction::execute() method. - -# Close the transaction (using Ndb::closeTransaction()). + -# Execute the transaction, using the NdbTransaction::execute() method. + -# Close the transaction (using Ndb::closeTransaction()). For an example of this process, see the program listing in @ref ndbapi_example1.cpp. To execute several parallel synchronous transactions, one can either - use multiple Ndb objects in several threads, or start multiple + use multiple Ndb objects in several threads, or start multiple applications programs. @section secNdbOperations Operations - Each NdbTransaction + Each NdbTransaction consists of a list of operations which are represented by instances - of Ndb*Operation. + of Ndb*Operation.

Single row operations

- After the operation is created using NdbTransaction::getNdbOperation() - (or NdbTransaction::getNdbIndexOperation()), it is defined in the following + After the operation is created using NdbTransaction::getNdbOperation() + (or NdbTransaction::getNdbIndexOperation()), it is defined in the following three steps: - -# Define the standard operation type, using NdbOperation::readTuple() - -# Specify search conditions, using NdbOperation::equal() - -# Specify attribute actions, using NdbOperation::getValue() + -# Define the standard operation type, using NdbOperation::readTuple() + -# Specify search conditions, using NdbOperation::equal() + -# Specify attribute actions, using NdbOperation::getValue() Here are two brief examples illustrating this process. For the sake of brevity, we omit error-handling. - This first example uses an NdbOperation: + This first example uses an NdbOperation: @code // 1. Create MyOperation= MyTransaction->getNdbOperation("MYTABLENAME"); @@ -120,7 +120,7 @@ For additional examples of this sort, see @ref ndbapi_example1.cpp and @ref ndbapi_example2.cpp. - The second example uses an NdbIndexOperation: + The second example uses an NdbIndexOperation: @code // 1. Create MyOperation= MyTransaction->getNdbIndexOperation("MYINDEX", "MYTABLENAME"); @@ -139,8 +139,6 @@ We will now discuss in somewhat greater detail each step involved in the creation and use of synchronous transactions. - // Edit stop point - JS, 20041228 0425+1000 -

Step 1: Define single row operation type

The following types of operations exist: -# NdbOperation::insertTuple : @@ -211,19 +209,19 @@ - They can be used to update or delete multiple rows - They can operate on several nodes in parallell - After the operation is created using NdbTransaction::getNdbScanOperation() - (or NdbTransaction::getNdbIndexScanOperation()), it is defined in the following + After the operation is created using NdbTransaction::getNdbScanOperation() + (or NdbTransaction::getNdbIndexScanOperation()), it is defined in the following three steps: - -# Define the standard operation type, using NdbScanOperation::readTuples() + -# Define the standard operation type, using NdbScanOperation::readTuples() -# Specify search conditions, using @ref NdbScanFilter and/or @ref NdbIndexScanOperation::setBound - -# Specify attribute actions, using NdbOperation::getValue() - -# Executing the transaction, using NdbTransaction::execute() - -# Iterating through the result set using NdbScanOperation::nextResult + -# Specify attribute actions, using NdbOperation::getValue() + -# Executing the transaction, using NdbTransaction::execute() + -# Iterating through the result set using NdbScanOperation::nextResult Here are two brief examples illustrating this process. For the sake of brevity, we omit error-handling. - This first example uses an NdbScanOperation: + This first example uses an NdbScanOperation: @code // 1. Create MyOperation= MyTransaction->getNdbScanOperation("MYTABLENAME"); @@ -242,7 +240,7 @@ MyRecAttr= MyOperation->getValue("ATTR2", NULL); @endcode - The second example uses an NdbIndexScanOperation: + The second example uses an NdbIndexScanOperation: @code // 1. Create MyOperation= MyTransaction->getNdbIndexScanOperation("MYORDEREDINDEX", "MYTABLENAME"); @@ -309,7 +307,7 @@ -# When iterating through the result set, for each row optionally call either NdbScanOperation::updateCurrentTuple or NdbScanOperation::deleteCurrentTuple - -# If performing NdbScanOperation::updateCurrentTuple, + -# If performing NdbScanOperation::updateCurrentTuple, set new values on record using ordinary @ref NdbOperation::setValue. NdbOperation::equal should _not_ be called as the primary key is retreived from the scan. @@ -337,10 +335,10 @@ But Ndb will only lock a batch of rows per fragment at a time. How many rows will be locked per fragment is controlled by the - batch parameter to @ref NdbScanOperation::readTuples. + batch parameter to @ref NdbScanOperation::readTuples. To let the application handle how locks are released - @ref NdbScanOperation::nextResult have a parameter fetch_allow. + @ref NdbScanOperation::nextResult have a parameter fetch_allow. If NdbScanOperation::nextResult is called with fetch_allow = false, no locks may be released as result of the function call. Otherwise the locks for the current batch may be released. -- cgit v1.2.1