title | perex | date | author | proofreading |
---|---|---|---|---|
Supported data types |
The article gives an introduction to data types in EvitaDB query language, including basic and advanced types,
and provides code examples to demonstrate their usage.
|
15.12.2022 |
Ing. Jan Novotný |
done |
This document lists all data types supported by evitaDB that can be used in attributes or associated data for storing client relevant data. There is automatic conversion process connected with associated data if the data doesn't fit into list of allowed data types. Attributes must always comply with allowed data types.
evitaDB data types are limited to following list:
- String, formatted as
'string'
- Byte, formatted as
5
- Short, formatted as
5
- Integer, formatted as
5
- Long, formatted as
5
- Boolean, formatted as
true
- Character, formatted as
'c'
- BigDecimal, formatted as
1.124
- OffsetDateTime, formatted as
2021-01-01T00:00:00+01:00
(offset needs to be maintained) - LocalDateTime, formatted as
2021-01-01T00:00:00
- LocalDate, formatted as
2021-01-01
- LocalTime, formatted as
00:00:00
- DateTimeRange, formatted as
[2021-01-01T00:00:00+01:00,2022-01-01T00:00:00+01:00]
- BigDecimalNumberRange, formatted as
[1.24,78]
- LongNumberRange, formatted as
[5,9]
- IntegerNumberRange, formatted as
[5,9]
- ShortNumberRange, formatted as
[5,9]
- ByteNumberRange, formatted as
[5,9]
- Locale, formatted as
`cs_CZ`
(enclosed in backticks) - Currency, formatted as
`CZK`
(enclosed in backticks)
represents a specific implementation of the Range.java defining from and to boundaries by the OffsetDateTime data types. The offset date times are written in the ISO format.
Range is written as:
- when both boundaries are specified:
[2021-01-01T00:00:00+01:00,2022-01-01T00:00:00+01:00]
- when a left boundary (since) is specified:
[2021-01-01T00:00:00+01:00,]
- when a right boundary (until) is specified:
[,2022-01-01T00:00:00+01:00]
Represents a specific implementation of the Range.java defining from and to boundaries by the Number data types. The supported number types are: Byte, Short, Integer, Long and BigDecimal.
Both boundaries of the number range must be of the same type - you cannot mix for example BigDecimal as lower bound and Byte as upper bound.
Range is written as:
- when both boundaries are specified:
[1,3.256]
- when a left boundary (since) is specified:
[1,]
- when a right boundary (until) is specified:
[,3.256]