types.ts 2.54 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
/*
 * Copyright (C) 2016 Centro de Computacao Cientifica e Software Livre
 * Departamento de Informatica - Universidade Federal do Parana
 *
 * This file is part of blend.
 *
 * blend is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * blend is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with blend.  If not, see <http://www.gnu.org/licenses/>.
 */

21 22 23
/**
 * Available aggregation function to metrics.
 */
24
export enum AggregationType {
25 26 27 28 29 30 31 32 33 34 35 36
    /** Used as error code. So suitable aggregation found. */
    NONE,
    /** Sum aggregation function. Sum of all registers. */
    SUM,
    /** Average aggregation function. Average of all registers. */
    AVG,
    /** Count agggreation function. Count the number of registers. */
    COUNT,
    /** Maximum aggregation function. The biggest value of all registers. */
    MAX,
    /** Minimum aggregation function. The smallest value of all registers. */
    MIN
37 38
};

39 40 41
/**
 * Available relationships between sub dimensions and its parents.
 */
42
export enum RelationType {
43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62
    /** Used when there are no relation. The dimension is not a sub dimension. */
    NONE,
    /**
     * Day relation.
     * The parent is a timestamp and the dimension is only the day of
     * the timestamp.
     */
    DAY,
    /**
     * Month relation.
     * The parent is a timestamp and the dimension is only the month of
     * the timestamp.
     */
    MONTH,
    /**
     * Year relation.
     * The parent is a timestamp and the dimension is only the year of
     * the timestamp.
     */
    YEAR,
63
};
64

65 66 67 68
/**
 * Available data types for metrics, dimensions and source members.
 * In other words types that BlenDB can handle.
 */
69
export enum DataType {
70
    /** Used as error code when no suitable type is found. */
71
    NONE,
72
    /** Interger type. */
73
    INTEGER,
74
    /** Floating number type. */
75
    FLOAT,
76
    /** String type. */
77
    STRING,
78
    /** Timestamp type. ISO format */
79
    DATE,
80
    /** True/False type. */
81
    BOOLEAN,
82 83 84 85 86 87
    /**
     * Enumerable type.
     * Custom type, that only accepts a set of previeous defined values.
     * Custom enumeration defined in configuration file.
     */
    ENUMTYPE
88
};