类 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 interfaceThe 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 StringHTTP_CONNECT_TIMEOUTthe timeout in milliseconds until a connection is established.static StringHTTP_KEEP_ALIVEstatic StringHTTP_POOL_SIZEmax pool sizestatic StringHTTP_SOCKET_TIMEOUTDefines 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 StringPROPERTY_KEY_BATCH_ERROR_IGNOREcontinue process commands in executeBatchstatic StringPROPERTY_KEY_BATCH_LOADfetch data from native function in a batch modelstatic StringPROPERTY_KEY_CHARSETKey for the char encoding used by the TSDB client in properties instancestatic StringPROPERTY_KEY_CONFIG_DIRKey for the configuration file directory of TSDB client in properties instancestatic StringPROPERTY_KEY_DBNAMEKey used to retrieve the database value from the properties instance passed to the driver.static StringPROPERTY_KEY_HOSTKey used to retrieve the host value from the properties instance passed to the driver.static StringPROPERTY_KEY_LOCALEKey for the locale used by the TSDB client in properties instancestatic StringPROPERTY_KEY_MAX_CONCURRENT_REQUESTmax message number send to server concurrentlystatic StringPROPERTY_KEY_MESSAGE_WAIT_TIMEOUTmessage receive from server timeout. msstatic StringPROPERTY_KEY_PASSWORDKey used to retrieve the password value from the properties instance passed to the driver.static StringPROPERTY_KEY_PORTKey used to retrieve the port number value from the properties instance passed to the driver.static StringPROPERTY_KEY_PRODUCT_NAMEPRODUCT_NAMEstatic StringPROPERTY_KEY_TIME_ZONEKey for the timezone used by the TSDB client in properties instancestatic StringPROPERTY_KEY_TOKENKey used to retrieve the token value from the properties instance passed to the driver.static StringPROPERTY_KEY_USE_SSLUse SSL (true/false) to communicate with the server.static StringPROPERTY_KEY_USERKey used to retrieve the user value from the properties instance passed to the driver.
-
构造器概要
构造器 构造器 说明 TSDBDriver()
-
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 booleanacceptsURL(String url)Connectionconnect(String url, Properties info)intgetMajorVersion()intgetMinorVersion()LoggergetParentLogger()DriverPropertyInfo[]getPropertyInfo(String url, Properties info)booleanjdbcCompliant()PropertiesparseURL(String url, Properties defaults)example: jdbc:TAOS://127.0.0.1:0/db?-
从类继承的方法 com.taosdata.jdbc.AbstractDriver
getPropertyInfo
-
-
-
-
字段详细资料
-
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_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.- 另请参阅:
- 常量字段值
-
-
方法详细资料
-
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- 返回:
trueif this driver understands the given URL;falseotherwise- 抛出:
SQLException- if a database access error occurs or the url isnull
-
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()
-
-