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.
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)
DateTimeRange
represents a specific implementation of the 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:
- when a left boundary (since) is specified:
- when a right boundary (until) is specified:
NumberRange
Represents a specific implementation of the
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:
- when a left boundary (since) is specified:
- when a right boundary (until) is specified: