#include <NdbDictionary.hpp>
Each column has a type. The type of a column is determined by a number of type specifiers. The type specifiers are:
Types in general correspond to MySQL types and their variants. Data formats are same as in MySQL. NDB API provides no support for constructing such formats. NDB kernel checks them however.
|
The builtin column types
|
|
Constructor
|
|
Copy constructor
|
|
Check if column is equal to some other column
|
|
For Char or Varchar or Text, get MySQL CHARSET_INFO. This specifies both character set and collation. See get_charset() etc in MySQL. (The cs is not "const" in MySQL). |
|
Get number of column (horizontal position within table) |
|
For blob, get "inline size" i.e. number of initial bytes to store in table's blob attribute. This part is normally in main memory and can be indexed and interpreted. |
|
Get length for column Array length for column or max length for variable length arrays. |
|
Get name of column
|
|
Get if the column is nullable or not |
|
Check if column is part of partition key A partition key is a set of attributes which are used to distribute the tuples onto the NDB nodes. The partition key uses the NDB Cluster hashing function. An example where this is useful is TPC-C where it might be good to use the warehouse id and district id as the partition key. This would place all data for a specific district and warehouse in the same database node. Locally in the fragments the full primary key will still be used with the hashing algorithm.
|
|
For blob, get "part size" i.e. number of bytes to store in each tuple of the "blob table". Can be set to zero to omit parts and to allow only inline bytes ("tinyblob"). |
|
Get precision of column.
|
|
Check if column is part of primary key |
|
Get scale of column.
|
|
Get size of element |
|
For blob, set or get "stripe size" i.e. number of consecutive parts to store in each node group. |
|
Get type of column |
|
For Char or Varchar or Text, get MySQL CHARSET_INFO. This specifies both character set and collation. See get_charset() etc in MySQL. (The cs is not "const" in MySQL). |
|
For blob, get "inline size" i.e. number of initial bytes to store in table's blob attribute. This part is normally in main memory and can be indexed and interpreted. |
|
Set length for column Array length for column or max length for variable length arrays. |
|
Set name of column
|
|
Set whether column is nullable or not |
|
Set partition key
|
|
For blob, get "part size" i.e. number of bytes to store in each tuple of the "blob table". Can be set to zero to omit parts and to allow only inline bytes ("tinyblob"). |
|
Set precision of column.
|
|
Set that column is part of primary key |
|
Set scale of column.
|
|
For blob, get "stripe size" i.e. number of consecutive parts to store in each node group. |
|
Set type of column
|