Mod ndb supported data types
[edit] Supported MySQL data types in mod_ndb
| Type | Out (GET) | In (POST) | Notes
|
| TINYINT | ✓ | ✓ | (5)
|
| SMALLINT | ✓ | ✓ | (5)
|
| MEDIUM INT | ✓ | ✓ | (5)
|
| INT | ✓ | ✓ |
|
| BIGINT | ✓ | ✓ |
|
| FLOAT | ✓ | ✓ |
|
| DOUBLE | ✓ | ✓ |
|
| (OLD)DECIMAL (MySQL 4) | ✘ | ✘ | (4)
|
| CHAR | ✓ | ✓ | (6)
|
| VARCHAR | ✓ | ✓ |
|
| BINARY | ✓ | ✘ | (7)
|
| VARBINARY | ✓ | ✘ | (7)
|
| DATETIME | ✓ | ✓ | (5) (8)
|
| DATE | ✓ | ✓ | (5)
|
| BLOB | ✓ | ✘ | (1) (7)
|
| TEXT | ✓ | ✘ | (1) (7)
|
| BIT | ✘ | ✘ |
|
| (LONG)VARCHAR (5.0) | ✓ | ✓ |
|
| (LONG)VARBINARY | ✘ | ✘ | (7)
|
| TIME | ✓ | ✓ | (5)
|
| YEAR | ✓ | ✓ | (5)
|
| TIMESTAMP | ✓ | ✓ | (2)
|
| DECIMAL (5.0) | ✓ | ✓ | (5)
|
| SET | ✘ | ✘ |
|
| ENUM | ✘ | ✘ |
|
This information comes from the mod_ndb source file MySQL_Field.cc. All numeric types listed here include both the signed and unsigned variants.
- TEXT and BLOB columns can be delivered only in RAW result format and as the sole result column.
- TIMESTAMP is displayed as an unsigned int. A TIMESTAMP column can be updated as an integer, or set to the current timestamp using "@time"
- UNSIGNED INT columns can be automatically incremented and decremented using "@++" and "@--"
- In MySQL 5.0, it is not possible to create columns with MySQL 4's old decimal types, so these types are not supported.
- Support added in the "rev 284" release of mod_ndb
- In results, CHAR columns are padded with spaces on the right to their full length
- POST support for these datatypes requires multipart/form-data support
- Datetime columns can be updated in MySQL's "YYYYMMDDHHMMSS" or "YYYY-MM-DD HH:MM:SS" formats.