[+/-]
Abstract
This section details the public types belonging to the
Column
class.
Abstract
This type describes the Column
's internal
attribute format.
Description. The attribute storage format can be either fixed or variable.
Enumeration values.
Value | Description |
---|---|
ArrayTypeFixed |
stored as a fixed number of bytes |
ArrayTypeShortVar |
stored as a variable number of bytes; uses 1 byte overhead |
ArrayTypeMediumVar |
stored as a variable number of bytes; uses 2 bytes overhead |
The fixed storage format is faster but also generally requires
more space than the variable format. The default is
ArrayTypeShortVar
for
Var*
types and
ArrayTypeFixed
for others. The default is
usually sufficient.
Abstract
This type describes the storage type used by a
Column
object.
Description.
The storage type used for a given column can be either in
memory or on disk. Columns stored on disk mean that less RAM
is required overall but such columns cannot be indexed, and
are potentially much slower to access. The default is
StorageTypeMemory
.
Enumeration values.
Value | Description |
---|---|
StorageTypeMemory |
Store the column in memory |
StorageTypeDisk |
Store the column on disk |
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 2.3.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
.