Abstract
Type is used to describe the
Column object's datatype.
Description.
Datatypes for Column objects are analogous
to the datatypes used by MySQL. The types
Tinyint,
Tinyintunsigned,
Smallint, Smallunsigned,
Mediumint,
Mediumunsigned, Int,
Unsigned, Bigint,
Bigunsigned, Float, and
Double (that is, types
Tinyint through Double
in the order listed in the Enumeration Values table) can be
used in arrays.
Enumeration values.
| Value | Description |
|---|---|
Undefined |
Undefined |
Tinyint |
1-byte signed integer |
Tinyunsigned |
1-byte unsigned integer |
Smallint |
2-byte signed integer |
Smallunsigned |
2-byte unsigned integer |
Mediumint |
3-byte signed integer |
Mediumunsigned |
3-byte unsigned integer |
Int |
4-byte signed integer |
Unsigned |
4-byte unsigned integer |
Bigint |
8-byte signed integer |
Bigunsigned |
8-byte signed integer |
Float |
4-byte float |
Double |
8-byte float |
Olddecimal |
Signed decimal as used prior to MySQL 5.0 |
Olddecimalunsigned |
Unsigned decimal as used prior to MySQL 5.0 |
Decimal |
Signed decimal as used by MySQL 5.0 and later |
Decimalunsigned |
Unsigned decimal as used by MySQL 5.0 and later |
Char |
A fixed-length array of 1-byte characters; maximum length is 255 characters |
Varchar |
A variable-length array of 1-byte characters; maximum length is 255 characters |
Binary |
A fixed-length array of 1-byte binary characters; maximum length is 255 characters |
Varbinary |
A variable-length array of 1-byte binary characters; maximum length is 255 characters |
Datetime |
An 8-byte date and time value, with a precision of 1 second |
Date |
A 4-byte date value, with a precision of 1 day |
Blob |
A binary large object; see Section 4.9, “The NdbBlob Class”
|
Text |
A text blob |
Bit |
A bit value; the length specifies the number of bits |
Longvarchar |
A 2-byte Varchar
|
Longvarbinary |
A 2-byte Varbinary
|
Time |
Time without date |
Year |
1-byte year value in the range 1901-2155 (same as MySQL) |
Timestamp |
Unix time |
Do not confuse Column::Type with
Object::Type or
Table::Type.

