Data Type Mapping
Data Type Mappings
The provider maps types from the data source to the corresponding data type available in the chosen cache database. The table below documents the mappings between the data types configured in the schema and the data types in the database.
Note that string columns can map to different data types depending on their length.
| Schema | .NET | JDBC | SQL Server | Derby | MySQL | Oracle | SQLite | Access |
| int | Int32 | int | int | INTEGER | INT | NUMBER | integer | LONG |
| double | Double | double | float | DOUBLE | DOUBLE | NUMBER | double | DOUBLE |
| datetime | DateTime | java.sql.Date | datetime | TIMESTAMP | DATETIME | TIMESTAMP | datetime | DATETIME |
| time | TimeSpan | java.sql.Time | time | TIME | TIME | TIMESTAMP | datetime | DATETIME |
| string | String | java.lang.String | If length > 4000: nvarchar(max), Otherwise: nvarchar(length) | If length > 32672: LONG VARCHAR, Otherwise VARCHAR(length) | If length > 255: LONGTEXT, Otherwise: VARCHAR(length) | If length > 4000: CLOB, Otherwise: VARCHAR2(length) | nvarchar(length) | If length > 255: LONGTEXT, Otherwise: VARCHAR(length) |
| long | Int64 | long | bigint | BIGINT | BIGINT | NUMBER | bigint | LONG |
| boolean | Boolean | boolean | tinyint | SMALLINT | BIT | NUMBER | tinyint | BIT |
| decimal | Decimal | java.math.BigDecimal | decimal | DECIMAL | DECIMAL | DECIMAL | decimal | CURRENCY |