Skip to content

Latest commit

 

History

History
98 lines (75 loc) · 4.68 KB

data_types.md

File metadata and controls

98 lines (75 loc) · 4.68 KB
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:

Application logic connected with evitaDB data types is located in evita_common/src/main/java/io/evitadb/dataType/EvitaDataTypes.java class.

DateTimeRange

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]

NumberRange

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]