程序包 com.taosdata.jdbc.utils

## 类 Utils

- java.lang.Object
- - com.taosdata.jdbc.utils.Utils

    public class Utils
    extends Object

### 构造器概要

构造器
`Utils()`

### 方法概要

所有方法 静态方法 具体方法
`static String` `escapeSingleQuota​(String origin)`
`static String` `formatTimestamp​(Timestamp timestamp)`
`static ClassLoader` `getClassLoader()`
`static String` `getNativeSql​(String rawSql, Object[] parameters)`
`static int` `guessTimestampPrecision​(String value)`
`static <T> T` `newInstance​(Class<T> c)` Instantiate the class
`static Class<?>` `parseClassType​(String key)`
`static Date` `parseDate​(String timestampStr)`
`static Time` `parseTime​(String timestampStr)`
`static Timestamp` `parseTimestamp​(String timeStampStr)`
`static String` `preprocessSql​(String rawSql)` Some of the SQLs sent by other popular frameworks or tools like Spark, contains syntax that cannot be parsed by the TDengine client.

### 从类继承的方法 java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### 构造器详细资料

#### Utils

    public Utils()

### 方法详细资料

#### parseTime

    public static Time parseTime​(String timestampStr)
                          throws DateTimeParseException

抛出:
  `DateTimeParseException`

#### parseDate

    public static Date parseDate​(String timestampStr)

#### parseTimestamp

    public static Timestamp parseTimestamp​(String timeStampStr)

#### escapeSingleQuota

    public static String escapeSingleQuota​(String origin)

#### getNativeSql

    public static String getNativeSql​(String rawSql,
                                      Object[] parameters)

#### formatTimestamp

    public static String formatTimestamp​(Timestamp timestamp)

#### guessTimestampPrecision

    public static int guessTimestampPrecision​(String value)

#### preprocessSql

    public static String preprocessSql​(String rawSql)

Some of the SQLs sent by other popular frameworks or tools like Spark, contains syntax that cannot be parsed by the TDengine client. Thus, some simple parsers/filters are intentionally added in this JDBC implementation in order to process those supported SQLs.

#### getClassLoader

    public static ClassLoader getClassLoader()

#### parseClassType

    public static Class<?> parseClassType​(String key)

#### newInstance

    public static <T> T newInstance​(Class<T> c)

Instantiate the class