#include <Ndb.hpp>
Always start your application program by creating an Ndb object. By using several Ndb objects it is possible to design a multi-threaded application, but note that Ndb objects cannot be shared by several threads. Different threads should use different Ndb objects. A thread might however use multiple Ndb objects. Currently there is a limit of maximum 128 Ndb objects per application process.
The Ndb object is multi-thread safe in the following manner. Each Ndb object can ONLY be handled in one thread. If an Ndb object is handed over to another thread then the application must ensure that a memory barrier is used to ensure that the new thread see all updates performed by the previous thread. Semaphores, mutexes and so forth are easy ways of issuing memory barriers without having to bother about the memory barrier concept.
|
The Ndb object represents a connection to a database.
|
|
Close a transaction.
|
|
Create a subcription to an event defined in the database
|
|
Drop a subscription to an event
|
|
The current database name can be fetched by getDatabaseName.
|
|
The current database schema name can be fetched by getDatabaseSchemaName.
|
|
Get an object for retrieving or manipulating database schema information
|
|
Get a NdbError object for a specific error code The NdbError object is valid until you call a new NDB API method. |
|
Get the NdbError object
|
|
Initializes the Ndb object
|
|
Wait for an event to occur. Will return as soon as an event is detected on any of the created events.
|
|
The current database name can be set by setDatabaseName.
|
|
The current database schema name can be set by setDatabaseSchemaName.
|
|
Start a transaction
|