Column definition
Each column in a table definition is:
str name ‖ type u8 ‖ flags u8 ‖ [varint len ‖ default as row-format]| Value | Type |
|---|---|
| 1 | INT |
| 2 | FLOAT |
| 3 | TEXT |
| 4 | BYTES |
| 5 | BOOL |
| 6 | TIMESTAMP |
| 7 | JSON |
These are the same type numbers as the cell tags 1 to 7 of the row format (cell tag 0 is NULL).
| Bit value | Flag |
|---|---|
| 1 | NOT NULL |
| 2 | AUTO_INCREMENT |
| 4 | has default |
The default, when present, is a one-cell row in the row format, preceded by its varint length. Richer type names, defaults and comments are in Ext M: metadata; column ids and fill values are in Ext S: schema.