Supported Types
OrientDB supports several types natively. Below is the complete table.
#id | Type | Description | Java type | Minimum Maximum |
Auto-conversion from/to |
---|---|---|---|---|---|
0 | Boolean | Handles only the values True or False | java.lang.Boolean or boolean |
0 1 |
String |
1 | Integer | 32-bit signed Integers | java.lang.Integer or int |
-2,147,483,648 +2,147,483,647 |
Any Number, String |
2 | Short | Small 16-bit signed integers | java.lang.Short or short |
-32,768 32,767 |
Any Number, String |
3 | Long | Big 64-bit signed integers | java.lang.Long or long |
-263 +263-1 |
Any Number, String |
4 | Float | Decimal numbers | java.lang.Float or float |
2-149 (2-2-23)*2127 |
Any Number, String |
5 | Double | Decimal numbers with high precision | java.lang.Double or double |
2-1074 (2-2-52)*21023 |
Any Number, String |
6 | Datetime | Any date with the precision up to milliseconds. To know more about it, look at Managing Dates | java.util.Date |
- 1002020303 |
Date, Long, String |
7 | String | Any string as alphanumeric sequence of chars | java.lang.String |
- - |
- |
8 | Binary | Can contain any value as byte array | byte[] |
0 2,147,483,647 |
String |
9 | Embedded | The Record is contained inside the owner. The contained Record has no RecordId | ORecord |
- - |
ORecord |
10 | Embedded list | The Records are contained inside the owner. The contained records have no RecordIds and are reachable only by navigating the owner record | List<Object> |
0 41,000,000 items |
String |
11 | Embedded set | The Records are contained inside the owner. The contained Records have no RecordId and are reachable only by navigating the owner record | Set<Object> |
0 41,000,000 items |
String |
12 | Embedded map | The Records are contained inside the owner as values of the entries, while the keys can only be Strings. The contained ords e no RecordIds and are reachable only by navigating the owner Record | Map<String, ORecord> |
0 41,000,000 items |
Collection<? extends ORecord<?>> , String |
13 | Link | Link to another Record. It's a common one-to-one relationship | ORID , <? extends ORecord> |
1:-1 32767:2^63-1 |
String |
14 | Link list | Links to other Records. It's a common one-to-many relationship where only the RecordIds are stored | List<? extends ORecord |
0 41,000,000 items |
String |
15 | Link set | Links to other Records. It's a common one-to-many relationship | Set<? extends ORecord> |
0 41,000,000 items |
Collection<? extends ORecord> , String |
16 | Link map | Links to other Records as value of the entries, while keys can only be Strings. It's a common One-to-Many Relationship. Only the RecordIds are stored | Map<String, ? extends Record> |
0 41,000,000 items |
String |
17 | Byte | Single byte. Useful to store small 8-bit signed integers | java.lang.Byte or byte |
-128 +127 |
Any Number, String |
18 | Transient | Any value not stored on database | |||
19 | Date | Any date as year, month and day. To know more about it, look at Managing Dates | java.util.Date |
- |
Date, Long, String |
20 | Custom | used to store a custom type providing the marshall and unmarshall methods | OSerializableStream |
0 X |
- |
21 | Decimal | Decimal numbers without rounding | java.math.BigDecimal |
? ? |
Any Number, String |
22 | LinkBag | List of RecordIds as spec RidBag | ORidBag |
? ? |
- |
23 | Any | Not determinated type, used to specify Collections of mixed type, and null | - | - | - |