From a39926ffe244f52a0e48580e73246ed76285fe8e Mon Sep 17 00:00:00 2001
From: "tomas@poseidon.ndb.mysql.com" <>
Date: Thu, 23 Dec 2004 12:18:22 +0100
Subject: [PATCH] removed interpreted program stuff from docs added
some doxygen skip internal
---
ndb/include/ndbapi/Ndb.hpp | 16 +++++++++-------
ndb/include/ndbapi/NdbOperation.hpp | 8 +++++++-
2 files changed, 16 insertions(+), 8 deletions(-)
diff --git a/ndb/include/ndbapi/Ndb.hpp b/ndb/include/ndbapi/Ndb.hpp
index e919c6de529..e8e23ca56c9 100644
--- a/ndb/include/ndbapi/Ndb.hpp
+++ b/ndb/include/ndbapi/Ndb.hpp
@@ -98,10 +98,12 @@
@section secNdbOperations Operations
Each transaction (NdbTransaction object) consist of a list of
- operations (Ndb*Operation objects).
+ operations (Ndb*Operation objects).
+#ifndef DOXYGEN_SHOULD_SKIP_INTERNAL
Operations are of two different kinds:
-# standard operations, and
-# interpreted program operations.
+#endif
Single row operations
After the operation is created using NdbTransaction::getNdbOperation
@@ -205,8 +207,7 @@
The result of reading data from an NdbRecAttr object before
calling NdbTransaction::execute is undefined.
-
-
+#ifndef DOXYGEN_SHOULD_SKIP_INTERNAL
Interpreted Program Operations
The following types of interpreted program operations exist:
-# NdbOperation::interpretedUpdateTuple :
@@ -267,7 +268,7 @@
There might be zero NdbOperation::getValue calls.
-# The fifth step is possible subroutine definitions using
NdbOperation::def_subroutine and NdbOperation::ret_sub.
-
+#endif
@subsection secScan Scanning
The most common use of interpreted programs is for scanning
@@ -361,7 +362,7 @@
but is of the following form:
-# Start transaction
-# Get NdbScanOperation for the table to be scanned
- -# NdbScanOperation::readTuplesExclusive returns a handle to a
+ -# NdbScanOperation::readTuples(NdbOperation::LM_Exclusive) returns a handle to a
NdbResultSet.
-# Search conditions are defined by NdbScanFilter
-# Call NdbTransaction::execute(NoCommit) to start the scan.
@@ -384,7 +385,7 @@
See the scan example program in @ref ndbapi_scan.cppn for example
usage of the new scan api.
-
+#ifndef DOXYGEN_SHOULD_SKIP_INTERNAL
Interpreted Programs
Interpretation programs are executed in a
register-based virtual machine.
@@ -455,6 +456,7 @@
The parameter used by NdbOperation::def_subroutine
should match the automatic numbering to make it easier to
debug the interpreted program.
+#endif
#ifndef DOXYGEN_SHOULD_SKIP_INTERNAL
@section secAsync Asynchronous Transactions
@@ -587,7 +589,7 @@
theTransaction = theNdb->startTransaction();
theOperation = theTransaction->getNdbOperation("TEST_TABLE");
if (theOperation == NULL) goto error;
- theOperation->readTuple();
+ theOperation->readTuple(NdbOperation::LM_Read);
theOperation->setValue("ATTR_1", at1);
theOperation->setValue("ATTR_2", at1); //Here an error occurs
theOperation->setValue("ATTR_3", at1);
diff --git a/ndb/include/ndbapi/NdbOperation.hpp b/ndb/include/ndbapi/NdbOperation.hpp
index a1d5541f6ac..9cdc5816bc4 100644
--- a/ndb/include/ndbapi/NdbOperation.hpp
+++ b/ndb/include/ndbapi/NdbOperation.hpp
@@ -168,7 +168,6 @@ public:
* @depricated
*/
virtual int dirtyRead();
-#endif
/**
* Define the NdbOperation to be a standard operation of type committedRead.
@@ -201,7 +200,9 @@ public:
* @return 0 if successful otherwise -1.
*/
virtual int dirtyWrite();
+#endif
+#ifndef DOXYGEN_SHOULD_SKIP_INTERNAL
/** @} *********************************************************************/
/**
* @name Define Interpreted Program Operation Type
@@ -221,6 +222,7 @@ public:
* @return 0 if successful otherwise -1.
*/
virtual int interpretedDeleteTuple();
+#endif
/** @} *********************************************************************/
@@ -377,6 +379,7 @@ public:
virtual NdbBlob* getBlobHandle(const char* anAttrName);
virtual NdbBlob* getBlobHandle(Uint32 anAttrId);
+#ifndef DOXYGEN_SHOULD_SKIP_INTERNAL
/** @} *********************************************************************/
/**
* @name Specify Interpreted Program Instructions
@@ -675,6 +678,7 @@ public:
* @return -1 if unsuccessful.
*/
int ret_sub();
+#endif
/** @} *********************************************************************/
@@ -723,6 +727,7 @@ public:
LockMode getLockMode() const { return theLockMode; }
void setAbortOption(Int8 ao) { m_abortOption = ao; }
+#ifndef DOXYGEN_SHOULD_SKIP_INTERNAL
/**
* Set/get distribution/partition key
*/
@@ -730,6 +735,7 @@ public:
void setPartitionHash(Uint32 key);
void setPartitionHash(const Uint64 *, Uint32 len);
Uint32 getPartitionId() const;
+#endif
protected:
int handle_distribution_key(const Uint64 *, Uint32 len);
protected: