Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mariadb
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
2e714857
Commit
2e714857
authored
Jan 04, 2005
by
tomas@poseidon.ndb.mysql.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
changed example names
and updated some docs
parent
9d267f4d
Changes
18
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
156 additions
and
99 deletions
+156
-99
ndb/examples/Makefile
ndb/examples/Makefile
+7
-2
ndb/examples/ndbapi_async_example1/Makefile
ndb/examples/ndbapi_async_example1/Makefile
+3
-3
ndb/examples/ndbapi_async_example1/ndbapi_async1.cpp
ndb/examples/ndbapi_async_example1/ndbapi_async1.cpp
+1
-1
ndb/examples/ndbapi_event_example/Makefile
ndb/examples/ndbapi_event_example/Makefile
+3
-3
ndb/examples/ndbapi_event_example/ndbapi_event.cpp
ndb/examples/ndbapi_event_example/ndbapi_event.cpp
+32
-1
ndb/examples/ndbapi_retries_example/Makefile
ndb/examples/ndbapi_retries_example/Makefile
+3
-3
ndb/examples/ndbapi_retries_example/ndbapi_retries.cpp
ndb/examples/ndbapi_retries_example/ndbapi_retries.cpp
+2
-2
ndb/examples/ndbapi_simple_example/Makefile
ndb/examples/ndbapi_simple_example/Makefile
+1
-1
ndb/examples/ndbapi_simple_example/ndbapi_simple.cpp
ndb/examples/ndbapi_simple_example/ndbapi_simple.cpp
+1
-1
ndb/examples/ndbapi_simple_index_example/Makefile
ndb/examples/ndbapi_simple_index_example/Makefile
+1
-1
ndb/examples/ndbapi_simple_index_example/ndbapi_simple_index.cpp
...mples/ndbapi_simple_index_example/ndbapi_simple_index.cpp
+1
-1
ndb/include/ndbapi/Ndb.hpp
ndb/include/ndbapi/Ndb.hpp
+76
-72
ndb/include/ndbapi/NdbDictionary.hpp
ndb/include/ndbapi/NdbDictionary.hpp
+1
-1
ndb/include/ndbapi/NdbError.hpp
ndb/include/ndbapi/NdbError.hpp
+1
-1
ndb/include/ndbapi/NdbEventOperation.hpp
ndb/include/ndbapi/NdbEventOperation.hpp
+1
-1
ndb/include/ndbapi/NdbOperation.hpp
ndb/include/ndbapi/NdbOperation.hpp
+13
-2
ndb/include/ndbapi/NdbRecAttr.hpp
ndb/include/ndbapi/NdbRecAttr.hpp
+1
-1
ndb/include/ndbapi/NdbTransaction.hpp
ndb/include/ndbapi/NdbTransaction.hpp
+8
-2
No files found.
ndb/examples/Makefile
View file @
2e714857
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))
...
...
ndb/examples/ndbapi_
example3
/Makefile
→
ndb/examples/ndbapi_
async_example1
/Makefile
View file @
2e714857
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
=
...
...
ndb/examples/ndbapi_
example2/ndbapi_example2
.cpp
→
ndb/examples/ndbapi_
async_example1/ndbapi_async1
.cpp
View file @
2e714857
...
...
@@ -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.
...
...
ndb/examples/ndbapi_e
xample5
/Makefile
→
ndb/examples/ndbapi_e
vent_example
/Makefile
View file @
2e714857
TARGET
=
ndbapi_e
xample5
SRCS
=
ndbapi_e
xample5
.cpp
OBJS
=
ndbapi_e
xample5
.o
TARGET
=
ndbapi_e
vent
SRCS
=
ndbapi_e
vent
.cpp
OBJS
=
ndbapi_e
vent
.o
CXX
=
g++
CFLAGS
=
-c
-Wall
-fno-rtti
-fno-exceptions
CXXFLAGS
=
...
...
ndb/examples/ndbapi_e
xample5/ndbapi_example5
.cpp
→
ndb/examples/ndbapi_e
vent_example/ndbapi_event
.cpp
View file @
2e714857
...
...
@@ -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>
...
...
ndb/examples/ndbapi_
example2
/Makefile
→
ndb/examples/ndbapi_
retries_example
/Makefile
View file @
2e714857
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
=
...
...
ndb/examples/ndbapi_
example3/ndbapi_example3
.cpp
→
ndb/examples/ndbapi_
retries_example/ndbapi_retries
.cpp
View file @
2e714857
...
...
@@ -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
...
...
ndb/examples/ndbapi_
example1
/Makefile
→
ndb/examples/ndbapi_
simple_example
/Makefile
View file @
2e714857
TARGET
=
ndbapi_
example1
TARGET
=
ndbapi_
simple
SRCS
=
$(TARGET)
.cpp
OBJS
=
$(TARGET)
.o
CXX
=
g++
...
...
ndb/examples/ndbapi_
example1/ndbapi_example1
.cpp
→
ndb/examples/ndbapi_
simple_example/ndbapi_simple
.cpp
View file @
2e714857
...
...
@@ -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:
*
...
...
ndb/examples/ndbapi_
example4
/Makefile
→
ndb/examples/ndbapi_
simple_index_example
/Makefile
View file @
2e714857
TARGET
=
ndbapi_
example4
TARGET
=
ndbapi_
simple_index
SRCS
=
$(TARGET)
.cpp
OBJS
=
$(TARGET)
.o
CXX
=
g++
...
...
ndb/examples/ndbapi_
example4/ndbapi_example4
.cpp
→
ndb/examples/ndbapi_
simple_index_example/ndbapi_simple_index
.cpp
View file @
2e714857
...
...
@@ -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:
//
...
...
ndb/include/ndbapi/Ndb.hpp
View file @
2e714857
This diff is collapsed.
Click to expand it.
ndb/include/ndbapi/NdbDictionary.hpp
View file @
2e714857
...
...
@@ -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:
...
...
ndb/include/ndbapi/NdbError.hpp
View file @
2e714857
...
...
@@ -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
{
/**
...
...
ndb/include/ndbapi/NdbEventOperation.hpp
View file @
2e714857
...
...
@@ -46,7 +46,7 @@ class NdbEventOperationImpl;
* The instance is removed by Ndb::dropEventOperation
*
* For more info see:
* @ref ndbapi_e
xample5
.cpp
* @ref ndbapi_e
vent
.cpp
*
* Known limitations:
*
...
...
ndb/include/ndbapi/NdbOperation.hpp
View file @
2e714857
...
...
@@ -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.
*
...
...
ndb/include/ndbapi/NdbRecAttr.hpp
View file @
2e714857
...
...
@@ -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
...
...
ndb/include/ndbapi/NdbTransaction.hpp
View file @
2e714857
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment