程序包 com.taosdata.jdbc

## 类 TSDBDriver

- java.lang.Object
- - com.taosdata.jdbc.AbstractDriver
  - - com.taosdata.jdbc.TSDBDriver

所有已实现的接口:
  `Driver`

    public class TSDBDriver
    extends AbstractDriver

The Java SQL framework allows for multiple database drivers. Each driver should supply a class that implements the Driver interface

The DriverManager will try to load as many drivers as it can find and then for any given connection request, it will ask each driver in turn to try to connect to the target URL.

It is strongly recommended that each Driver class should be small and stand alone so that the Driver class can be loaded and queried without bringing in vast quantities of supporting code.

When a Driver class is loaded, it should create an instance of itself and register it with the DriverManager. This means that a user can load and register a driver by doing Class.forName("foo.bah.Driver")

### 字段概要

字段
`static String` `HTTP_CONNECT_TIMEOUT` the timeout in milliseconds until a connection is established.
`static String` `HTTP_KEEP_ALIVE`
`static String` `HTTP_POOL_SIZE` max pool size
`static String` `HTTP_SOCKET_TIMEOUT` Defines the socket timeout in milliseconds, which is the timeout for waiting for data or, put differently, a maximum period inactivity between two consecutive data packets.
`static String` `PROPERTY_KEY_BATCH_ERROR_IGNORE` continue process commands in executeBatch
`static String` `PROPERTY_KEY_BATCH_LOAD` fetch data from native function in a batch model
`static String` `PROPERTY_KEY_CHARSET` Key for the char encoding used by the TSDB client in properties instance
`static String` `PROPERTY_KEY_CONFIG_DIR` Key for the configuration file directory of TSDB client in properties instance
`static String` `PROPERTY_KEY_DBNAME` Key used to retrieve the database value from the properties instance passed to the driver.
`static String` `PROPERTY_KEY_HOST` Key used to retrieve the host value from the properties instance passed to the driver.
`static String` `PROPERTY_KEY_LOCALE` Key for the locale used by the TSDB client in properties instance
`static String` `PROPERTY_KEY_MAX_CONCURRENT_REQUEST` max message number send to server concurrently
`static String` `PROPERTY_KEY_MESSAGE_WAIT_TIMEOUT` message receive from server timeout. ms
`static String` `PROPERTY_KEY_PASSWORD` Key used to retrieve the password value from the properties instance passed to the driver.
`static String` `PROPERTY_KEY_PORT` Key used to retrieve the port number value from the properties instance passed to the driver.
`static String` `PROPERTY_KEY_PRODUCT_NAME` PRODUCT_NAME
`static String` `PROPERTY_KEY_TIME_ZONE` Key for the timezone used by the TSDB client in properties instance
`static String` `PROPERTY_KEY_TOKEN` Key used to retrieve the token value from the properties instance passed to the driver.
`static String` `PROPERTY_KEY_USE_SSL` Use SSL (true/false) to communicate with the server.
`static String` `PROPERTY_KEY_USER` Key used to retrieve the user value from the properties instance passed to the driver.

### 构造器概要

构造器
`TSDBDriver()`

### 方法概要

所有方法 实例方法 具体方法
`boolean` `acceptsURL​(String url)`
`Connection` `connect​(String url, Properties info)`
`int` `getMajorVersion()`
`int` `getMinorVersion()`
`Logger` `getParentLogger()`
`DriverPropertyInfo[]` `getPropertyInfo​(String url, Properties info)`
`boolean` `jdbcCompliant()`
`Properties` `parseURL​(String url, Properties defaults)` example: jdbc:TAOS://127.0.0.1:0/db?

### 从类继承的方法 com.taosdata.jdbc.AbstractDriver

`getPropertyInfo`

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

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

### 字段详细资料

#### PROPERTY_KEY_PRODUCT_NAME

    public static final String PROPERTY_KEY_PRODUCT_NAME

PRODUCT_NAME

另请参阅:
  常量字段值

#### PROPERTY_KEY_HOST

    public static final String PROPERTY_KEY_HOST

Key used to retrieve the host value from the properties instance passed to the driver.

另请参阅:
  常量字段值

#### PROPERTY_KEY_PORT

    public static final String PROPERTY_KEY_PORT

Key used to retrieve the port number value from the properties instance passed to the driver.

另请参阅:
  常量字段值

#### PROPERTY_KEY_DBNAME

    public static final String PROPERTY_KEY_DBNAME

Key used to retrieve the database value from the properties instance passed to the driver.

另请参阅:
  常量字段值

#### PROPERTY_KEY_USER

    public static final String PROPERTY_KEY_USER

Key used to retrieve the user value from the properties instance passed to the driver.

另请参阅:
  常量字段值

#### PROPERTY_KEY_PASSWORD

    public static final String PROPERTY_KEY_PASSWORD

Key used to retrieve the password value from the properties instance passed to the driver.

另请参阅:
  常量字段值

#### PROPERTY_KEY_TOKEN

    public static final String PROPERTY_KEY_TOKEN

Key used to retrieve the token value from the properties instance passed to the driver. Just for Cloud Service

另请参阅:
  常量字段值

#### PROPERTY_KEY_USE_SSL

    public static final String PROPERTY_KEY_USE_SSL

Use SSL (true/false) to communicate with the server. The default value is false. Just for Cloud Service

另请参阅:
  常量字段值

#### PROPERTY_KEY_CONFIG_DIR

    public static final String PROPERTY_KEY_CONFIG_DIR

Key for the configuration file directory of TSDB client in properties instance

另请参阅:
  常量字段值

#### PROPERTY_KEY_TIME_ZONE

    public static final String PROPERTY_KEY_TIME_ZONE

Key for the timezone used by the TSDB client in properties instance

另请参阅:
  常量字段值

#### PROPERTY_KEY_LOCALE

    public static final String PROPERTY_KEY_LOCALE

Key for the locale used by the TSDB client in properties instance

另请参阅:
  常量字段值

#### PROPERTY_KEY_CHARSET

    public static final String PROPERTY_KEY_CHARSET

Key for the char encoding used by the TSDB client in properties instance

另请参阅:
  常量字段值

#### PROPERTY_KEY_BATCH_LOAD

    public static final String PROPERTY_KEY_BATCH_LOAD

fetch data from native function in a batch model

另请参阅:
  常量字段值

#### PROPERTY_KEY_BATCH_ERROR_IGNORE

    public static final String PROPERTY_KEY_BATCH_ERROR_IGNORE

continue process commands in executeBatch

另请参阅:
  常量字段值

#### PROPERTY_KEY_MESSAGE_WAIT_TIMEOUT

    public static final String PROPERTY_KEY_MESSAGE_WAIT_TIMEOUT

message receive from server timeout. ms

另请参阅:
  常量字段值

#### PROPERTY_KEY_MAX_CONCURRENT_REQUEST

    public static final String PROPERTY_KEY_MAX_CONCURRENT_REQUEST

max message number send to server concurrently

另请参阅:
  常量字段值

#### HTTP_POOL_SIZE

    public static final String HTTP_POOL_SIZE

max pool size

另请参阅:
  常量字段值

#### HTTP_KEEP_ALIVE

    public static final String HTTP_KEEP_ALIVE

另请参阅:
  常量字段值

#### HTTP_CONNECT_TIMEOUT

    public static final String HTTP_CONNECT_TIMEOUT

the timeout in milliseconds until a connection is established. zero is interpreted as an infinite timeout.

另请参阅:
  常量字段值

#### HTTP_SOCKET_TIMEOUT

    public static final String HTTP_SOCKET_TIMEOUT

Defines the socket timeout in milliseconds, which is the timeout for waiting for data or, put differently, a maximum period inactivity between two consecutive data packets. zero is interpreted as an infinite timeout.

另请参阅:
  常量字段值

### 构造器详细资料

#### TSDBDriver

    public TSDBDriver()

### 方法详细资料

#### connect

    public Connection connect​(String url,
                              Properties info)
                       throws SQLException

抛出:
  `SQLException`

#### acceptsURL

    public boolean acceptsURL​(String url)
                       throws SQLException

参数:
  `url` - the URL of the database
返回:
  `true` if this driver understands the given URL; `false` otherwise
抛出:
  `SQLException` - if a database access error occurs or the url is `null`

#### getPropertyInfo

    public DriverPropertyInfo[] getPropertyInfo​(String url,
                                                Properties info)
                                         throws SQLException

抛出:
  `SQLException`

#### parseURL

    public Properties parseURL​(String url,
                               Properties defaults)

example: jdbc:TAOS://127.0.0.1:0/db?user=root&password=your_password

覆盖:
  `parseURL` 在类中 `AbstractDriver`

#### getMajorVersion

    public int getMajorVersion()

#### getMinorVersion

    public int getMinorVersion()

#### jdbcCompliant

    public boolean jdbcCompliant()

#### getParentLogger

    public Logger getParentLogger()