public class TSDBDriver extends AbstractDriver
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")
| Modifier and Type | Field and Description |
|---|---|
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_APP_IP |
static String |
PROPERTY_KEY_APP_NAME |
static String |
PROPERTY_KEY_ASYNC_WRITE |
static String |
PROPERTY_KEY_BACKEND_WRITE_THREAD_NUM |
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_BATCH_SIZE_BY_ROW |
static String |
PROPERTY_KEY_CACHE_SIZE_BY_ROW |
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_CONNECT_MODE
connect mode
|
static String |
PROPERTY_KEY_COPY_DATA
for efficient writing
|
static String |
PROPERTY_KEY_DBNAME
Key used to retrieve the database value from the properties instance passed
to the driver.
|
static String |
PROPERTY_KEY_DISABLE_SSL_CERT_VALIDATION |
static String |
PROPERTY_KEY_ENABLE_AUTO_RECONNECT |
static String |
PROPERTY_KEY_ENABLE_COMPRESSION |
static String |
PROPERTY_KEY_ENDPOINTS
Key used to retrieve the endpoints 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.
|
static String |
PROPERTY_KEY_PASSWORD
Key used to retrieve the password value from the properties instance passed
to the driver.
|
static String |
PROPERTY_KEY_PBS_MODE
for stmt bind mode
|
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_RECONNECT_INTERVAL_MS |
static String |
PROPERTY_KEY_RECONNECT_RETRY_COUNT |
static String |
PROPERTY_KEY_RETRY_TIMES |
static String |
PROPERTY_KEY_SLAVE_CLUSTER_HOST |
static String |
PROPERTY_KEY_SLAVE_CLUSTER_PORT |
static String |
PROPERTY_KEY_STRICT_CHECK |
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.
|
static String |
PROPERTY_KEY_VARCHAR_AS_STRING
Specifies whether to treat VARCHAR as STRING type.
|
static String |
PROPERTY_KEY_WS_KEEP_ALIVE_SECONDS |
static String |
URL_PREFIX |
| Constructor and Description |
|---|
TSDBDriver() |
| Modifier and Type | Method and Description |
|---|---|
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?user=root&password=your_password
|
getPropertyInfo, getWSConnectionpublic static final String URL_PREFIX
public static final String PROPERTY_KEY_PRODUCT_NAME
public static final String PROPERTY_KEY_HOST
public static final String PROPERTY_KEY_PORT
public static final String PROPERTY_KEY_ENDPOINTS
public static final String PROPERTY_KEY_DBNAME
public static final String PROPERTY_KEY_USER
public static final String PROPERTY_KEY_PASSWORD
public static final String PROPERTY_KEY_TOKEN
public static final String PROPERTY_KEY_USE_SSL
public static final String PROPERTY_KEY_CONFIG_DIR
public static final String PROPERTY_KEY_TIME_ZONE
public static final String PROPERTY_KEY_LOCALE
public static final String PROPERTY_KEY_CHARSET
public static final String PROPERTY_KEY_BATCH_LOAD
public static final String PROPERTY_KEY_BATCH_ERROR_IGNORE
public static final String PROPERTY_KEY_MESSAGE_WAIT_TIMEOUT
public static final String PROPERTY_KEY_WS_KEEP_ALIVE_SECONDS
public static final String PROPERTY_KEY_CONNECT_MODE
public static final String PROPERTY_KEY_VARCHAR_AS_STRING
public static final String PROPERTY_KEY_ENABLE_COMPRESSION
public static final String PROPERTY_KEY_ENABLE_AUTO_RECONNECT
public static final String PROPERTY_KEY_SLAVE_CLUSTER_HOST
public static final String PROPERTY_KEY_SLAVE_CLUSTER_PORT
public static final String PROPERTY_KEY_RECONNECT_INTERVAL_MS
public static final String PROPERTY_KEY_RECONNECT_RETRY_COUNT
public static final String PROPERTY_KEY_DISABLE_SSL_CERT_VALIDATION
public static final String PROPERTY_KEY_APP_IP
public static final String PROPERTY_KEY_APP_NAME
public static final String PROPERTY_KEY_COPY_DATA
public static final String PROPERTY_KEY_BATCH_SIZE_BY_ROW
public static final String PROPERTY_KEY_CACHE_SIZE_BY_ROW
public static final String PROPERTY_KEY_BACKEND_WRITE_THREAD_NUM
public static final String PROPERTY_KEY_STRICT_CHECK
public static final String PROPERTY_KEY_RETRY_TIMES
public static final String PROPERTY_KEY_ASYNC_WRITE
public static final String PROPERTY_KEY_PBS_MODE
public static final String PROPERTY_KEY_MAX_CONCURRENT_REQUEST
public static final String HTTP_POOL_SIZE
public static final String HTTP_KEEP_ALIVE
public static final String HTTP_CONNECT_TIMEOUT
public static final String HTTP_SOCKET_TIMEOUT
public Connection connect(String url, Properties info) throws SQLException
SQLExceptionpublic boolean acceptsURL(String url) throws SQLException
url - the URL of the databasetrue if this driver understands the given URL;
false otherwiseSQLException - if a database access error occurs or the url is nullpublic DriverPropertyInfo[] getPropertyInfo(String url, Properties info) throws SQLException
SQLExceptionpublic Properties parseURL(String url, Properties defaults) throws SQLException
SQLExceptionpublic int getMajorVersion()
public int getMinorVersion()
public boolean jdbcCompliant()
public Logger getParentLogger()
Copyright © 2025. All rights reserved.