Skip to content

Data Types

There are primitive and container data types in AnnaDB.

Primitives

Primitive data types are a set of basic types whose values can not be decoupled. In TySON, primitives are represented as prefix|value| or prefix only. Prefix in AnnaDB shows the data type.

Type Description Prefix Example
Number Integer or float point number n n|101|
String Any string. `|` symbols must be escaped with `\` s s|Lorem ipsum|
Bool A boolean value b b|true|
Null A marker that indicating that something has no value null null
Unix Timestamp The number of seconds that have elapsed since the Unix epoch uts uts|123456789|
Link Id of an object. The collection name is used for the prefix Collection name users|e0bbcda2-0911-495e-9f0f-ce00db489f10|

Containers

Container data types keep primitive and container objects using specific rules.

Type Description Prefix Example
Vector An ordered set of elements of any type v v[n|1|,n|2|,n|3|,]
Map An associative array m m{ s|bar|: s|baz|,}