MySQL 5.6.14 Source Code Document
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
NdbSchemaCon Class Reference

Represents a schema transaction. More...

#include <NdbSchemaCon.hpp>

Public Member Functions

int execute ()
NdbSchemaOpgetNdbSchemaOp ()
const NdbErrorgetNdbError () const

Static Public Member Functions

static NdbSchemaConstartSchemaTrans (Ndb *pNdb)
static void closeSchemaTrans (NdbSchemaCon *pSchCon)

Friends

class Ndb
class NdbSchemaOp

Detailed Description

Represents a schema transaction.

When creating a new table, the first step is to get a NdbSchemaCon object to represent the schema transaction. This is done by calling Ndb::startSchemaTransaction.

The next step is to get a NdbSchemaOp object by calling NdbSchemaCon::getNdbSchemaOp. The NdbSchemaOp object then has methods to define the table and its attributes.

Finally, the NdbSchemaCon::execute method inserts the table into the database.

Note
Currently only one table can be added per transaction.
Deprecated, use NdbDictionary

Definition at line 51 of file NdbSchemaCon.hpp.

Member Function Documentation

int NdbSchemaCon::execute ( )

Execute a schema transaction.

Returns
0 if successful otherwise -1.

Definition at line 108 of file NdbSchemaCon.cpp.

const NdbError & NdbSchemaCon::getNdbError ( ) const

Get the latest error

Returns
Error object.

Definition at line 160 of file NdbSchemaCon.cpp.

NdbSchemaOp * NdbSchemaCon::getNdbSchemaOp ( )

Get a schemaoperation.

Note
Currently, only one operation per transaction is allowed.
Returns
Pointer to a NdbSchemaOp or NULL if unsuccessful.

Definition at line 77 of file NdbSchemaCon.cpp.

Friends And Related Function Documentation

friend class Ndb
friend

Reciver(s)

Definition at line 53 of file NdbSchemaCon.hpp.


The documentation for this class was generated from the following files: