public class TSDBJNIConnector extends Object
| 构造器和说明 |
|---|
TSDBJNIConnector() |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
bindColumnDataArray(long stmt,
ByteBuffer colDataList,
ByteBuffer lengthList,
ByteBuffer isNullList,
int type,
int bytes,
int numOfRows,
int columnIndex) |
void |
closeBatch(long stmt) |
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) |
void |
executeBatch(long stmt) |
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(long pSql)
Free result set operation from C to release result set 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
|
int |
getResultTimePrecision(long sqlObj)
Get Result Time Precision.
|
int |
getSchemaMetaData(long resultSet,
List<ColumnMetaData> columnMetaData)
Get schema metadata
|
static String |
getTsCharset() |
static void |
init(String configDir,
String locale,
String charset,
String timezone) |
static void |
initImp(String configDir) |
void |
insertLines(String[] lines) |
boolean |
isClosed() |
boolean |
isResultsetClosed() |
boolean |
isUpdateQuery(long pSql) |
long |
prepareStmt(String sql) |
void |
setBindTableName(long stmt,
String tableName) |
void |
setBindTableNameAndTags(long stmt,
String tableName,
int numOfTags,
ByteBuffer tags,
ByteBuffer typeList,
ByteBuffer lengthList,
ByteBuffer nullList) |
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 boolean isUpdateQuery(long pSql)
public int freeResultSet(long pSql)
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 int getResultTimePrecision(long sqlObj)
public void closeConnection()
throws SQLException
SQLExceptionpublic boolean validateCreateTableSql(String sql)
public long prepareStmt(String sql) throws SQLException
SQLExceptionpublic void setBindTableName(long stmt,
String tableName)
throws SQLException
SQLExceptionpublic void setBindTableNameAndTags(long stmt,
String tableName,
int numOfTags,
ByteBuffer tags,
ByteBuffer typeList,
ByteBuffer lengthList,
ByteBuffer nullList)
throws SQLException
SQLExceptionpublic void bindColumnDataArray(long stmt,
ByteBuffer colDataList,
ByteBuffer lengthList,
ByteBuffer isNullList,
int type,
int bytes,
int numOfRows,
int columnIndex)
throws SQLException
SQLExceptionpublic void executeBatch(long stmt)
throws SQLException
SQLExceptionpublic void closeBatch(long stmt)
throws SQLException
SQLExceptionpublic void insertLines(String[] lines) throws SQLException
SQLExceptionCopyright © 2021. All rights reserved.