All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.taosdata.jdbc.common.DataLengthCfg Maven / Gradle / Ivy

There is a newer version: 3.4.0
Show newest version
package com.taosdata.jdbc.common;

import java.util.HashMap;

import static com.taosdata.jdbc.TSDBConstants.*;

public class DataLengthCfg {
    private static final HashMap dataLengthMap= new HashMap(){{
        put(TSDB_DATA_TYPE_NULL, 1);
        put(TSDB_DATA_TYPE_BOOL, 1);
        put(TSDB_DATA_TYPE_TINYINT, 1);
        put(TSDB_DATA_TYPE_SMALLINT, 2);
        put(TSDB_DATA_TYPE_INT, 4);
        put(TSDB_DATA_TYPE_BIGINT, 8);
        put(TSDB_DATA_TYPE_FLOAT, 4);
        put(TSDB_DATA_TYPE_DOUBLE, 8);
        put(TSDB_DATA_TYPE_TIMESTAMP, 8);
    }};
    public static Integer getDataLength(int dataType){
        return dataLengthMap.get(dataType);
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy