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

com.taosdata.jdbc.enums.TimestampPrecision Maven / Gradle / Ivy

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

public class TimestampPrecision {
    public static final int MS = 0;
    public static final int US = 1;
    public static final int NS = 2;
    public static final int UNKNOWN = 9999;

    public static int getPrecision(String precision) {
        if (precision == null)
            return UNKNOWN;
        String trim = precision.trim();
        switch (trim) {
            case "ms":
                return MS;
            case "us":
                return US;
            case "ns":
                return NS;
            default:
                return UNKNOWN;
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy