updated data types and added reference to (https://github.com/JetBrains/Exposed/issues/1087) (#16)

* updated data types and added reference to  (https://github.com/JetBra…
This commit is contained in:
Jakob Hain
2021-09-03 18:08:47 -04:00
committed by GitHub
parent 7b24a07d67
commit f1d3f012fa

View File

@@ -10,13 +10,19 @@ Currently Exposed support the following data types in table definition:
* `enumeration` - `INT` ordinal value
* `enumerationByName` - `VARCHAR`
* `customEnumeration` - see [additional section](#how-to-use-database-enum-types)
* `date` - `DATETIME`
* `datetime` - `DATETIME`
* `blob` - `BLOB`
* `binary` - `VARBINARY` with length
* `uuid` - `BINARY(16)`
* `reference` - a foreign key
The `exposed-java-time` extension (`org.jetbrains.exposed:exposed-java-time:$exposed_version`) provides additional types
* `date` - `DATETIME`
* `time` - `TIME`
* `datetime` - `DATETIME`
* `timestamp` - `TIMESTAMP`
* `duration` - `DURATION`
Note: some types are different for specific DB dialect.
## How to use database Enum types