When FDO describes the schema of an existing table that was not created by the ApplySchema command, it maps native data types to FDO data types. This mapping is described here.
The name of the schema is the concatenation of ‘Fdo’ and the name of the database. This is the database created using the ‘CREATE DATABASE’ command and containing the existing table(s). The table names are the class names, and the column names are the property names.
The length of a bit field is in the range 1-64. A row in a column of type bit(64) can hold 64 bit values.
The following native types are not mapped to FDO data types: float, float unsigned, real unsigned, double unsigned, binary, varbinary, tinyblob, blob, mediumblob, longblob, tinytext, mediumtext, and longtext.
| Native Type | Defaults | FDO Data Type |
|---|---|---|
| bit( | length = 1 | Boolean |
| bit(2) | Byte | |
| bit(64) | Int64 | |
| tinyint | length = 4 | Int16 |
| tinyint unsigned | length = 3 | Byte |
| smallint | length = 6 | Int16 |
| smallint unsigned | length = 5 | Int32 |
| mediumint | length = 9 | Int32 |
| mediumint unsigned | length = 8 | Int32 |
| int | length = 11 | Int32 |
| int unsigned | length = 10 | Int64 |
| bigint | length = 20 | Int64 |
| bigint unsigned | length = 20 | Int64 |
| real | Double | |
| double | Double | |
| numeric | precision = 10; scale = 0 | Decimal (precision = 10; scale = 0) |
| numeric unsigned | precision = 10; scale = 0 | Decimal (precision = 10; scale = 0) |
| date | DateTime | |
| datetime | DateTime | |
| timestamp | DateTime | |
| year | Int32 | |
| char(64) | String (length = 192) | |
| varchar(64) | String (length = 192) | |
| enum | String | |
| set | String |