public class TSDBJNIConnector extends Object
| 构造器和说明 |
|---|
TSDBJNIConnector() |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
closeConnection()
Execute close operation from C to release connection pointer by JNI
|
boolean |
connect(String host,
int port,
String dbName,
String user,
String password)
Get connection pointer
|
long |
executeQuery(String sql)
Execute DML/DDL operation
|
int |
fetchBlock(long resultSet,
TSDBResultSetBlockData blockData) |
int |
fetchRow(long resultSet,
TSDBResultSetRowData rowData)
Get one row data
|
int |
freeResultSet()
Close the open result set which is associated to the current connection.
|
int |
freeResultSet(long result)
Free resultset operation from C to release resultset pointer by JNI
|
int |
getAffectedRows(long pSql)
Get affected rows count
|
int |
getErrCode(long pSql)
Get recent error code by connection
|
String |
getErrMsg(long pSql)
Get recent error message by connection
|
long |
getResultSet()
Get resultset pointer
Each connection should have a single open result set at a time
|
int |
getSchemaMetaData(long resultSet,
List<ColumnMetaData> columnMetaData)
Get schema metadata
|
static String |
getTsCharset() |
static void |
init(String configDir,
String locale,
String charset,
String timezone)
Initialize static variables in JNI to optimize performance
|
static void |
initImp(String configDir) |
boolean |
isClosed()
Whether the connection is closed
|
boolean |
isResultsetClosed()
Returns the status of last result set in current connection
|
boolean |
isUpdateQuery(long pSql) |
static int |
setOptions(int optionIndex,
String optionValue) |
boolean |
validateCreateTableSql(String sql)
Validate if a create table sql statement is correct without actually creating that table
|
public boolean isClosed()
public boolean isResultsetClosed()
public static void init(String configDir, String locale, String charset, String timezone) throws SQLWarning
SQLWarningpublic static void initImp(String configDir)
public static int setOptions(int optionIndex,
String optionValue)
public static String getTsCharset()
public boolean connect(String host, int port, String dbName, String user, String password) throws SQLException
SQLExceptionpublic long executeQuery(String sql) throws SQLException
SQLExceptionpublic int getErrCode(long pSql)
public String getErrMsg(long pSql)
public long getResultSet()
public boolean isUpdateQuery(long pSql)
public int freeResultSet(long result)
public int freeResultSet()
public int getAffectedRows(long pSql)
public int getSchemaMetaData(long resultSet,
List<ColumnMetaData> columnMetaData)
public int fetchRow(long resultSet,
TSDBResultSetRowData rowData)
public int fetchBlock(long resultSet,
TSDBResultSetBlockData blockData)
public void closeConnection()
throws SQLException
SQLExceptionpublic boolean validateCreateTableSql(String sql)
Copyright © 2020. All rights reserved.