summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorunknown <tomas@poseidon.ndb.mysql.com>2005-01-04 16:15:15 +0100
committerunknown <tomas@poseidon.ndb.mysql.com>2005-01-04 16:15:15 +0100
commit584f68e8ad77f90fefaf5a4b23580b38009fe8d7 (patch)
tree56bccd57ae596fe2be5e40610b84266fe795242d
parentfcdd5e4333f133f4bdf753bbb664c688a44c68c3 (diff)
downloadmariadb-git-584f68e8ad77f90fefaf5a4b23580b38009fe8d7.tar.gz
changed example names
and updated some docs
-rw-r--r--ndb/examples/Makefile9
-rw-r--r--ndb/examples/ndbapi_async_example1/Makefile (renamed from ndb/examples/ndbapi_example3/Makefile)6
-rw-r--r--ndb/examples/ndbapi_async_example1/ndbapi_async1.cpp (renamed from ndb/examples/ndbapi_example2/ndbapi_example2.cpp)2
-rw-r--r--ndb/examples/ndbapi_event_example/Makefile (renamed from ndb/examples/ndbapi_example5/Makefile)6
-rw-r--r--ndb/examples/ndbapi_event_example/ndbapi_event.cpp (renamed from ndb/examples/ndbapi_example5/ndbapi_example5.cpp)33
-rw-r--r--ndb/examples/ndbapi_retries_example/Makefile (renamed from ndb/examples/ndbapi_example2/Makefile)6
-rw-r--r--ndb/examples/ndbapi_retries_example/ndbapi_retries.cpp (renamed from ndb/examples/ndbapi_example3/ndbapi_example3.cpp)4
-rw-r--r--ndb/examples/ndbapi_simple_example/Makefile (renamed from ndb/examples/ndbapi_example1/Makefile)2
-rw-r--r--ndb/examples/ndbapi_simple_example/ndbapi_simple.cpp (renamed from ndb/examples/ndbapi_example1/ndbapi_example1.cpp)2
-rw-r--r--ndb/examples/ndbapi_simple_index_example/Makefile (renamed from ndb/examples/ndbapi_example4/Makefile)2
-rw-r--r--ndb/examples/ndbapi_simple_index_example/ndbapi_simple_index.cpp (renamed from ndb/examples/ndbapi_example4/ndbapi_example4.cpp)2
-rw-r--r--ndb/include/ndbapi/Ndb.hpp148
-rw-r--r--ndb/include/ndbapi/NdbDictionary.hpp2
-rw-r--r--ndb/include/ndbapi/NdbError.hpp2
-rw-r--r--ndb/include/ndbapi/NdbEventOperation.hpp2
-rw-r--r--ndb/include/ndbapi/NdbOperation.hpp15
-rw-r--r--ndb/include/ndbapi/NdbRecAttr.hpp2
-rw-r--r--ndb/include/ndbapi/NdbTransaction.hpp10
18 files changed, 156 insertions, 99 deletions
diff --git a/ndb/examples/Makefile b/ndb/examples/Makefile
index d533c4ff422..87a821773ec 100644
--- a/ndb/examples/Makefile
+++ b/ndb/examples/Makefile
@@ -1,5 +1,10 @@
-BIN_DIRS := ndbapi_example1 ndbapi_example3 ndbapi_example4 \
- ndbapi_example5 ndbapi_scan_example
+BIN_DIRS := ndbapi_simple_example \
+ ndbapi_async_example \
+ ndbapi_async_example1 \
+ ndbapi_retries_example \
+ ndbapi_simple_index_example \
+ ndbapi_event_example \
+ ndbapi_scan_example
bins: $(patsubst %, _bins_%, $(BIN_DIRS))
diff --git a/ndb/examples/ndbapi_example3/Makefile b/ndb/examples/ndbapi_async_example1/Makefile
index d7355650ada..b6fc31a00e5 100644
--- a/ndb/examples/ndbapi_example3/Makefile
+++ b/ndb/examples/ndbapi_async_example1/Makefile
@@ -1,6 +1,6 @@
-TARGET = ndbapi_example3
-SRCS = ndbapi_example3.cpp
-OBJS = ndbapi_example3.o
+TARGET = ndbapi_async1
+SRCS = ndbapi_async1.cpp
+OBJS = ndbapi_async1.o
CXX = g++
CFLAGS = -c -Wall -fno-rtti -fno-exceptions
DEBUG =
diff --git a/ndb/examples/ndbapi_example2/ndbapi_example2.cpp b/ndb/examples/ndbapi_async_example1/ndbapi_async1.cpp
index de19cb19584..9af9c72c260 100644
--- a/ndb/examples/ndbapi_example2/ndbapi_example2.cpp
+++ b/ndb/examples/ndbapi_async_example1/ndbapi_async1.cpp
@@ -15,7 +15,7 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
//
-// ndbapi_example2.cpp: Using asynchronous transactions in NDB API
+// ndbapi_async1.cpp: Using asynchronous transactions in NDB API
//
// Execute ndbapi_example1 to create the table "MYTABLENAME"
// before executing this program.
diff --git a/ndb/examples/ndbapi_example5/Makefile b/ndb/examples/ndbapi_event_example/Makefile
index 67460402210..07d244c9346 100644
--- a/ndb/examples/ndbapi_example5/Makefile
+++ b/ndb/examples/ndbapi_event_example/Makefile
@@ -1,6 +1,6 @@
-TARGET = ndbapi_example5
-SRCS = ndbapi_example5.cpp
-OBJS = ndbapi_example5.o
+TARGET = ndbapi_event
+SRCS = ndbapi_event.cpp
+OBJS = ndbapi_event.o
CXX = g++
CFLAGS = -c -Wall -fno-rtti -fno-exceptions
CXXFLAGS =
diff --git a/ndb/examples/ndbapi_example5/ndbapi_example5.cpp b/ndb/examples/ndbapi_event_example/ndbapi_event.cpp
index e2e29e2d62c..82e39e32d13 100644
--- a/ndb/examples/ndbapi_example5/ndbapi_example5.cpp
+++ b/ndb/examples/ndbapi_event_example/ndbapi_event.cpp
@@ -15,7 +15,38 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
/**
- * ndbapi_example5.cpp: Using API level events in NDB API
+ * ndbapi_event.cpp: Using API level events in NDB API
+ *
+ * Classes and methods used in this example:
+ *
+ * Ndb_cluster_connection
+ * connect()
+ * wait_until_ready()
+ *
+ * Ndb
+ * init()
+ * getDictionary()
+ * createEventOperation()
+ * dropEventOperation()
+ * pollEvents()
+ *
+ * NdbDictionary
+ * createEvent()
+ * dropEvent()
+ *
+ * NdbDictionary::Event
+ * setTable()
+ * addtableEvent()
+ * addEventColumn()
+ *
+ * NdbEventOperation
+ * getValue()
+ * getPreValue()
+ * execute()
+ * next()
+ * isConsistent()
+ * getEventType()
+ *
*/
#include <NdbApi.hpp>
diff --git a/ndb/examples/ndbapi_example2/Makefile b/ndb/examples/ndbapi_retries_example/Makefile
index 53dfb047beb..c7a8946cd9a 100644
--- a/ndb/examples/ndbapi_example2/Makefile
+++ b/ndb/examples/ndbapi_retries_example/Makefile
@@ -1,6 +1,6 @@
-TARGET = ndbapi_example2
-SRCS = ndbapi_example2.cpp
-OBJS = ndbapi_example2.o
+TARGET = ndbapi_retries
+SRCS = ndbapi_retries.cpp
+OBJS = ndbapi_retries.o
CXX = g++
CFLAGS = -c -Wall -fno-rtti -fno-exceptions
DEBUG =
diff --git a/ndb/examples/ndbapi_example3/ndbapi_example3.cpp b/ndb/examples/ndbapi_retries_example/ndbapi_retries.cpp
index 9d2014c4eb4..e832964ee94 100644
--- a/ndb/examples/ndbapi_example3/ndbapi_example3.cpp
+++ b/ndb/examples/ndbapi_retries_example/ndbapi_retries.cpp
@@ -15,9 +15,9 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
//
-// ndbapi_example3.cpp: Error handling and transaction retries
+// ndbapi_retries.cpp: Error handling and transaction retries
//
-// Execute ndbapi_example1 to create the table "MYTABLENAME"
+// Execute ndbapi_simple to create the table "MYTABLENAME"
// before executing this program.
//
// There are many ways to program using the NDB API. In this example
diff --git a/ndb/examples/ndbapi_example1/Makefile b/ndb/examples/ndbapi_simple_example/Makefile
index 8b17700d2e2..99d4bfe68a6 100644
--- a/ndb/examples/ndbapi_example1/Makefile
+++ b/ndb/examples/ndbapi_simple_example/Makefile
@@ -1,4 +1,4 @@
-TARGET = ndbapi_example1
+TARGET = ndbapi_simple
SRCS = $(TARGET).cpp
OBJS = $(TARGET).o
CXX = g++
diff --git a/ndb/examples/ndbapi_example1/ndbapi_example1.cpp b/ndb/examples/ndbapi_simple_example/ndbapi_simple.cpp
index e033c8f4cca..f97032f66ed 100644
--- a/ndb/examples/ndbapi_example1/ndbapi_example1.cpp
+++ b/ndb/examples/ndbapi_simple_example/ndbapi_simple.cpp
@@ -15,7 +15,7 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
/*
- * ndbapi_example1.cpp: Using synchronous transactions in NDB API
+ * ndbapi_simple.cpp: Using synchronous transactions in NDB API
*
* Correct output from this program is:
*
diff --git a/ndb/examples/ndbapi_example4/Makefile b/ndb/examples/ndbapi_simple_index_example/Makefile
index 9bcdc14d437..dc17ff0eeaa 100644
--- a/ndb/examples/ndbapi_example4/Makefile
+++ b/ndb/examples/ndbapi_simple_index_example/Makefile
@@ -1,4 +1,4 @@
-TARGET = ndbapi_example4
+TARGET = ndbapi_simple_index
SRCS = $(TARGET).cpp
OBJS = $(TARGET).o
CXX = g++
diff --git a/ndb/examples/ndbapi_example4/ndbapi_example4.cpp b/ndb/examples/ndbapi_simple_index_example/ndbapi_simple_index.cpp
index 5073794a713..efd77b96eae 100644
--- a/ndb/examples/ndbapi_example4/ndbapi_example4.cpp
+++ b/ndb/examples/ndbapi_simple_index_example/ndbapi_simple_index.cpp
@@ -15,7 +15,7 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
//
-// ndbapi_example4.cpp: Using secondary indexes in NDB API
+// ndbapi_simple_index.cpp: Using secondary indexes in NDB API
//
// Correct output from this program is:
//
diff --git a/ndb/include/ndbapi/Ndb.hpp b/ndb/include/ndbapi/Ndb.hpp
index 97e869baf9b..666a3597fba 100644
--- a/ndb/include/ndbapi/Ndb.hpp
+++ b/ndb/include/ndbapi/Ndb.hpp
@@ -25,7 +25,7 @@
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,
+ - Ndb is the main class, representing a connection to a database,
- NdbTransaction represents a transaction,
- NdbOperation represents an operation using a primary key,
- NdbScanOperation represents an operation performing a full table scan.
@@ -44,15 +44,15 @@
The main structure of an application program is as follows:
-# 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
- -# Delete cluster connection
+ -# Construct and initialize Ndb object(s) to connect to a database.
+ -# Define and execute transactions using NdbTransaction.
+ -# Delete Ndb objects.
+ -# Delete cluster connection.
The main structure of a transaction is as follows:
-# Start transaction (an NdbTransaction)
-# Add and define operations associated with the transaction using
- Ndb*Operation
+ NdbOperation, NdbScanOperation, NdbIndexOperation, NdbIndexScanOperation
-# Execute transaction
The execution can be of two different types,
@@ -65,8 +65,9 @@
for later execution.
If the execute is of type <var>Commit</var>, then the transaction is
- committed, and no further addition or definition of operations
- is allowed.
+ committed. The transaction <em>must</em> be closed after it has been
+ commited (event if commit fails), and no further addition or definition of
+ operations is allowed.
@section secSync Synchronous Transactions
@@ -78,14 +79,18 @@
(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.
+ -# Define operations and add them to the transaction, using
+ NdbTransaction::getNdbOperation(),
+ NdbTransaction::getNdbScanOperation(),
+ NdbTransaction::getNdbIndexOperation(), or
+ NdbTransaction::getNdbIndexScanOperation(),
+ and methods of the respective NdbOperation 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()).
- For an example of this process, see the program listing in @ref ndbapi_example1.cpp.
+ For an example of this process, see the program listing in
+ @ref ndbapi_simple.cpp.
To execute several parallel synchronous transactions, one can either
use multiple Ndb objects in several threads, or start multiple
@@ -93,9 +98,9 @@
@section secNdbOperations Operations
- Each NdbTransaction
- consists of a list of operations which are represented by instances
- of Ndb*Operation.
+ Each NdbTransaction consists of a list of operations which are represented
+ by instances of NdbOperation, NdbScanOperation, NdbIndexOperation, and/or
+ NdbIndexScanOperation.
<h3>Single row operations</h3>
After the operation is created using NdbTransaction::getNdbOperation()
@@ -105,8 +110,8 @@
-# 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.
+ Here are two brief examples illustrating this process. For the sake of
+ brevity, we omit error-handling.
This first example uses an NdbOperation:
@code
@@ -122,12 +127,12 @@
// 4. Attribute Actions
MyRecAttr= MyOperation->getValue("ATTR2", NULL);
@endcode
- For additional examples of this sort, see @ref ndbapi_example1.cpp.
+ For additional examples of this sort, see @ref ndbapi_simple.cpp.
The second example uses an NdbIndexOperation:
@code
// 1. Create
- MyOperation= MyTransaction->getNdbIndexOperation("MYINDEX", "MYTABLENAME");
+ MyOperation= MyTransaction->getNdbIndexOperation("MYINDEX","MYTABLENAME");
// 2. Define type of operation and lock mode
MyOperation->readTuple(NdbOperation::LM_Read);
@@ -138,10 +143,11 @@
// 4. Attribute Actions
MyRecAttr = MyOperation->getValue("ATTR2", NULL);
@endcode
- Another example of this second type can be found in @ref ndbapi_example4.cpp.
+ Another example of this second type can be found in
+ @ref ndbapi_simple_index.cpp.
- We will now discuss in somewhat greater detail each step involved in the creation
- and use of synchronous transactions.
+ We will now discuss in somewhat greater detail each step involved in the
+ creation and use of synchronous transactions.
<h4>Step 1: Define single row operation type</h4>
The following types of operations exist:
@@ -162,18 +168,11 @@
operate on a defined unique hash index.)
@note If you want to define multiple operations within the same transaction,
- then you need to call NdbTransaction::getNdb*Operation for each
- operation.
+ then you need to call NdbTransaction::getNdbOperation() or
+ NdbTransaction::getNdbIndexOperation() for each operation.
<h4>Step 2: Specify Search Conditions</h4>
- The search condition is used to select tuples.
-
- For NdbOperation::insertTuple it is also allowed to define the
- search key by using NdbOperation::setValue.
- The NDB API will automatically detect that it is
- supposed to use NdbOperation::equal instead.
- For NdbOperation::insertTuple it is not necessary to use
- NdbOperation::setValue on key attributes before other attributes.
+ The search condition is used to select tuples using NdbOperation::equal()
<h4>Step 3: Specify Attribute Actions</h4>
Now it is time to define which attributes should be read or updated.
@@ -183,21 +182,21 @@
also possible to use the attribute identity to define the
attribute.
- NdbOperation::getValue returns an NdbRecAttr object
+ NdbOperation::getValue() returns an NdbRecAttr object
containing the read value.
To get the value, there is actually two methods.
The application can either
- use its own memory (passed through a pointer aValue) to
- NdbOperation::getValue, or
+ NdbOperation::getValue(), or
- receive the attribute value in an NdbRecAttr object allocated
by the NDB API.
- The NdbRecAttr object is released when Ndb::closeTransaction
+ The NdbRecAttr object is released when Ndb::closeTransaction()
is called.
Thus, the application can not reference this object after
- Ndb::closeTransaction have been called.
+ Ndb::closeTransaction() have been called.
The result of reading data from an NdbRecAttr object before
- calling NdbTransaction::execute is undefined.
+ calling NdbTransaction::execute() is undefined.
@subsection secScan Scan Operations
@@ -214,16 +213,17 @@
- 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
- three steps:
+ (or NdbTransaction::getNdbIndexScanOperation()),
+ it is defined in the following three steps:
-# Define the standard operation type, using NdbScanOperation::readTuples()
- -# Specify search conditions, using @ref NdbScanFilter and/or @ref NdbIndexScanOperation::setBound
+ -# 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
+ -# 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.
+ Here are two brief examples illustrating this process. For the sake of
+ brevity, we omit error-handling.
This first example uses an NdbScanOperation:
@code
@@ -262,11 +262,14 @@
@endcode
<h4>Step 1: Define scan operation operation type</h4>
- Scan operations only support 1 operation, @ref NdbScanOperation::readTuples or @ref NdbIndexScanOperation::readTuples
+ Scan operations only support 1 operation,
+ @ref NdbScanOperation::readTuples()
+ or @ref NdbIndexScanOperation::readTuples()
- @note If you want to define multiple scan operations within the same transaction,
- then you need to call NdbTransaction::getNdb*ScanOperation for each
- operation.
+ @note If you want to define multiple scan operations within the same
+ transaction, then you need to call
+ NdbTransaction::getNdbScanOperation() or
+ NdbTransaction::getNdbIndexScanOperation() for each operation.
<h4>Step 2: Specify Search Conditions</h4>
The search condition is used to select tuples.
@@ -288,33 +291,32 @@
also possible to use the attribute identity to define the
attribute.
- NdbOperation::getValue returns an NdbRecAttr object
+ NdbOperation::getValue() returns an NdbRecAttr object
containing the read value.
To get the value, there is actually two methods.
The application can either
- use its own memory (passed through a pointer aValue) to
- NdbOperation::getValue, or
+ NdbOperation::getValue(), or
- receive the attribute value in an NdbRecAttr object allocated
by the NDB API.
- The NdbRecAttr object is released when Ndb::closeTransaction
- is called.
- Thus, the application can not reference this object after
- Ndb::closeTransaction have been called.
+ The NdbRecAttr object is released when Ndb::closeTransaction()
+ is called. Thus, the application can not reference this object after
+ Ndb::closeTransaction() have been called.
The result of reading data from an NdbRecAttr object before
- calling NdbTransaction::execute is undefined.
+ calling NdbTransaction::execute() is undefined.
<h3> Using Scan to update/delete </h3>
Scanning can also be used to update/delete rows.
This is performed by
-# Scan using exclusive locks, NdbOperation::LM_Exclusive
-# When iterating through the result set, for each row optionally call
- either NdbScanOperation::updateCurrentTuple or
- NdbScanOperation::deleteCurrentTuple
- -# 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.
+ either NdbScanOperation::updateCurrentTuple() or
+ NdbScanOperation::deleteCurrentTuple()
+ -# If performing NdbScanOperation::updateCurrentTuple(),
+ set new values on record using ordinary @ref NdbOperation::setValue().
+ NdbOperation::equal() should <em>not</em> be called as the primary
+ key is retreived from the scan.
@note that the actual update/delete will not be performed until next
NdbTransaction::execute (as with single row operations),
@@ -323,12 +325,14 @@
<h4> Index scans specific features </h4>
The following features are available when performing an index scan
- - Scan subset of table using @ref NdbIndexScanOperation::setBound
- - Ordering result set ascending or descending, @ref NdbIndexScanOperation::readTuples
+ - Scan subset of table using @ref NdbIndexScanOperation::setBound()
+ - Ordering result set ascending or descending,
+ @ref NdbIndexScanOperation::readTuples()
- When using NdbIndexScanOperation::BoundEQ on distribution key
only fragment containing rows will be scanned.
Rows are returned unordered unless sorted is set to true.
+
@note When performing sorted scan, parameter parallelism to readTuples will
be ignored and max parallelism will be used instead.
@@ -342,8 +346,8 @@
batch parameter to @ref NdbScanOperation::readTuples.
To let the application handle how locks are released
- @ref NdbScanOperation::nextResult have a parameter fetch_allow.
- If NdbScanOperation::nextResult is called with fetch_allow = false, no
+ @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.
@@ -423,25 +427,25 @@
*******************************************************************************/
/**
- * @page ndbapi_example1.cpp ndbapi_example1.cpp
- * @include ndbapi_example1.cpp
+ * @page ndbapi_simple.cpp ndbapi_simple.cpp
+ * @include ndbapi_simple.cpp
*/
#ifndef DOXYGEN_SHOULD_SKIP_INTERNAL
/**
- * @page ndbapi_example2.cpp ndbapi_example2.cpp
- * @include ndbapi_example2.cpp
+ * @page ndbapi_async1.cpp ndbapi_async1.cpp
+ * @include ndbapi_async1.cpp
*/
#endif
/**
- * @page ndbapi_example3.cpp ndbapi_example3.cpp
- * @include ndbapi_example3.cpp
+ * @page ndbapi_retries.cpp ndbapi_retries.cpp
+ * @include ndbapi_retries.cpp
*/
/**
- * @page ndbapi_example4.cpp ndbapi_example4.cpp
- * @include ndbapi_example4.cpp
+ * @page ndbapi_simple_index.cpp ndbapi_simple_index.cpp
+ * @include ndbapi_simple_index.cpp
*/
/**
diff --git a/ndb/include/ndbapi/NdbDictionary.hpp b/ndb/include/ndbapi/NdbDictionary.hpp
index 8556754e2a6..75232a3cee5 100644
--- a/ndb/include/ndbapi/NdbDictionary.hpp
+++ b/ndb/include/ndbapi/NdbDictionary.hpp
@@ -56,7 +56,7 @@ typedef struct charset_info_st CHARSET_INFO;
* -# NdbDictionary::Column for creating table columns
* -# NdbDictionary::Index for creating secondary indexes
*
- * See @ref ndbapi_example4.cpp for details of usage.
+ * See @ref ndbapi_simple_index.cpp for details of usage.
*/
class NdbDictionary {
public:
diff --git a/ndb/include/ndbapi/NdbError.hpp b/ndb/include/ndbapi/NdbError.hpp
index 8cde2a8cf38..45dbd5d3995 100644
--- a/ndb/include/ndbapi/NdbError.hpp
+++ b/ndb/include/ndbapi/NdbError.hpp
@@ -41,7 +41,7 @@
* The <em>error messages</em> and <em>error details</em> may
* change without notice.
*
- * For example of use, see @ref ndbapi_example3.cpp.
+ * For example of use, see @ref ndbapi_retries.cpp.
*/
struct NdbError {
/**
diff --git a/ndb/include/ndbapi/NdbEventOperation.hpp b/ndb/include/ndbapi/NdbEventOperation.hpp
index dc02df7fa4a..8c2de36fc51 100644
--- a/ndb/include/ndbapi/NdbEventOperation.hpp
+++ b/ndb/include/ndbapi/NdbEventOperation.hpp
@@ -46,7 +46,7 @@ class NdbEventOperationImpl;
* The instance is removed by Ndb::dropEventOperation
*
* For more info see:
- * @ref ndbapi_example5.cpp
+ * @ref ndbapi_event.cpp
*
* Known limitations:
*
diff --git a/ndb/include/ndbapi/NdbOperation.hpp b/ndb/include/ndbapi/NdbOperation.hpp
index 4d7db773505..ce556fb5b7a 100644
--- a/ndb/include/ndbapi/NdbOperation.hpp
+++ b/ndb/include/ndbapi/NdbOperation.hpp
@@ -237,10 +237,13 @@ public:
* use several equals (then all of them must be satisfied for the
* tuple to be selected).
*
- * @note There are 10 versions of NdbOperation::equal with
+ * @note For insertTuple() it is also allowed to define the
+ * search key by using setValue().
+ *
+ * @note There are 10 versions of equal() with
* slightly different parameters.
*
- * @note When using NdbOperation::equal with a string (char *) as
+ * @note When using equal() with a string (char *) as
* second argument, the string needs to be padded with
* zeros in the following sense:
* @code
@@ -248,6 +251,8 @@ public:
* strncpy(buf, str, sizeof(buf));
* NdbOperation->equal("Attr1", buf);
* @endcode
+ *
+ *
*
* @param anAttrName Attribute name
* @param aValue Attribute value.
@@ -328,6 +333,12 @@ public:
* then the API will assume that the pointer
* is correct and not bother with checking it.
*
+ * @note For insertTuple() the NDB API will automatically detect that
+ * it is supposed to use equal() instead.
+ *
+ * @note For insertTuple() it is not necessary to use
+ * setValue() on key attributes before other attributes.
+ *
* @note There are 14 versions of NdbOperation::setValue with
* slightly different parameters.
*
diff --git a/ndb/include/ndbapi/NdbRecAttr.hpp b/ndb/include/ndbapi/NdbRecAttr.hpp
index 3b596c60d09..86f891dca95 100644
--- a/ndb/include/ndbapi/NdbRecAttr.hpp
+++ b/ndb/include/ndbapi/NdbRecAttr.hpp
@@ -39,7 +39,7 @@ class NdbOperation;
* ndbout << MyRecAttr->u_32_value();
* @endcode
* For more examples, see
- * @ref ndbapi_example1.cpp.
+ * @ref ndbapi_simple.cpp.
*
* @note The NdbRecAttr object is instantiated with its value when
* NdbTransaction::execute is called. Before this, the value is
diff --git a/ndb/include/ndbapi/NdbTransaction.hpp b/ndb/include/ndbapi/NdbTransaction.hpp
index 10d641c022e..16effcaf05f 100644
--- a/ndb/include/ndbapi/NdbTransaction.hpp
+++ b/ndb/include/ndbapi/NdbTransaction.hpp
@@ -298,7 +298,7 @@ public:
* ExecType::Rollback rollbacks the entire transaction.
* @param callback A callback method. This method gets
* called when the transaction has been
- * executed. See @ref ndbapi_example2.cpp
+ * executed. See @ref ndbapi_async1.cpp
* for an example on how to specify and use
* a callback method.
* @param anyObject A void pointer. This pointer is forwarded to the
@@ -366,7 +366,13 @@ public:
* Once a transaction has been completed successfully
* it can be started again wo/ calling closeTransaction/startTransaction
*
- * Note this method also releases completed operations
+ * @note This method also releases completed operations
+ *
+ * @note This method does not close open scans,
+ * c.f. NdbScanOperation::close()
+ *
+ * @note This method can only be called _directly_ after commit
+ * and only if commit is successful
*/
int restart();
#endif