Understanding Data Types
You will find in this section the different data formats supported.
-
The JDL column represents the type that can be used in the JDL files.
-
The PostgreSQL column shows how the data is stored in the database.
-
The Java column shows the used type in the collectors.
-
The DBM column represents the data type imported from DOC3.9.
JDL | PostgreSQL | Java | DBM |
---|---|---|---|
String | text | String | VARCHAR, CHAR |
Integer | integer | Integer | INTEGER INT SMALLINT TINYINT |
Long | bigint | Long | BIGINT |
Double | double precision | Double | DOUBLE PRECISION, DECIMAL, FLOAT, REAL, NUMERIC |
Boolean | boolean | Boolean | BOOLEAN, BIT |
Instant | bigint | Instant | TIMESTAMP, DATE |
LocalDate | bigint | LocalDate | - |
LocalTime | bigint | LocalTime | TIME |
LocalDateTime | bigint | LocalDateTime | - |
Duration | bigint | Duration | - |
Binary | bytea | byte[] | BINARY |
To send data between services or to the web client, the following format is used:
JDL | Typescript | Java | Representation |
---|---|---|---|
String | string | String | - |
Integer | number | Integer | - |
Long | number | Long | - |
Double | number | Double | - |
Boolean | boolean | Boolean | - |
Instant | number | Long | The number of milliseconds since the epoch of 1970-01-01T00:00:00Z |
LocalDate | number | Long | The number of days since the epoch of 1970-01-01T00:00:00Z |
LocalTime | number | Long | The number of milliseconds from beginning of the day |
LocalDateTime | number | Long | The number of milliseconds since the epoch of 1970-01-01T00:00:00Z using UTC offset |
Duration | number | Long | The total length of the duration in milliseconds |
Binary | string | String | A Base64-encoded string |