aboutsummaryrefslogtreecommitdiffstats
path: root/vespajlib/src/main/java/com/yahoo/data/access/Type.java
blob: 354568e88083d2d34f88ea384d08a837d7b05c5f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.data.access;

/**
 * Enumeration of all possible types accessed by the Inspector API.
 * Note that:
 * - the EMPTY type is used as a placeholder where data is missing.
 * - all integers are put into LONGs; the encoding takes care of
 *   packing small integers compactly so this is also efficient.
 * - likeweise DOUBLE is the only floating-point type, but "simple"
 *   numbers (like 0.0 or 1.0) are packed compactly anyway.
 * - DATA can be used anything for wrapping anything else serialized
 *   as an array of bytes.
 * - maps should be represented as an ARRAY of OBJECTs where each
 *   object has the fields "key" and "value".
 */
public enum Type {

    EMPTY, BOOL, LONG, DOUBLE, STRING, DATA, ARRAY, OBJECT;

}