public class TSDBJNIConnector extends Object
| Modifier and Type | Field and Description |
|---|---|
protected long |
taos |
| Constructor and Description |
|---|
TSDBJNIConnector() |
| Modifier and Type | Method and Description |
|---|---|
void |
addBatch(long stmt) |
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
|
long |
executeQuery(String sql,
Long reqId) |
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
|
int |
getTableVGroupID(String db,
String table)
VGroupID
|
static void |
init(Properties props) |
void |
insertLines(String[] lines,
SchemalessProtocolType protocolType,
SchemalessTimestampType timestampType) |
void |
insertLinesWithReqId(String[] lines,
SchemalessProtocolType protocolType,
SchemalessTimestampType timestampType,
long reqId) |
void |
insertLinesWithTtl(String[] lines,
SchemalessProtocolType protocolType,
SchemalessTimestampType timestampType,
int ttl) |
void |
insertLinesWithTtlAndReqId(String[] lines,
SchemalessProtocolType protocolType,
SchemalessTimestampType timestampType,
int ttl,
long reqId) |
int |
insertRaw(String line,
SchemalessProtocolType protocolType,
SchemalessTimestampType timestampType) |
int |
insertRawWithReqId(String line,
SchemalessProtocolType protocolType,
SchemalessTimestampType timestampType,
long reqId) |
int |
insertRawWithTtl(String line,
SchemalessProtocolType protocolType,
SchemalessTimestampType timestampType,
int ttl) |
int |
insertRawWithTtlAndReqId(String line,
SchemalessProtocolType protocolType,
SchemalessTimestampType timestampType,
int ttl,
long reqId) |
boolean |
isClosed() |
boolean |
isResultsetClosed() |
boolean |
isUpdateQuery(long pSql) |
long |
prepareStmt(String sql) |
long |
prepareStmt(String sql,
Long reqId) |
void |
setBindTableName(long stmt,
String tableName) |
void |
setBindTableNameAndTags(long stmt,
String tableName,
int numOfTags,
ByteBuffer tags,
ByteBuffer typeList,
ByteBuffer lengthList,
ByteBuffer nullList) |
public static void init(Properties props) throws SQLWarning
SQLWarningpublic boolean connect(String host, int port, String dbName, String user, String password) throws SQLException
SQLExceptionpublic long executeQuery(String sql) throws SQLException
SQLExceptionpublic long executeQuery(String sql, Long reqId) throws SQLException
SQLExceptionpublic int getErrCode(long pSql)
public String getErrMsg(long pSql)
public boolean isUpdateQuery(long pSql)
public boolean isClosed()
public boolean isResultsetClosed()
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 long prepareStmt(String sql) throws SQLException
SQLExceptionpublic long prepareStmt(String sql, Long reqId) 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 addBatch(long stmt)
throws SQLException
SQLExceptionpublic void closeBatch(long stmt)
throws SQLException
SQLExceptionpublic void insertLines(String[] lines, SchemalessProtocolType protocolType, SchemalessTimestampType timestampType) throws SQLException
SQLExceptionpublic void insertLinesWithReqId(String[] lines, SchemalessProtocolType protocolType, SchemalessTimestampType timestampType, long reqId) throws SQLException
SQLExceptionpublic void insertLinesWithTtl(String[] lines, SchemalessProtocolType protocolType, SchemalessTimestampType timestampType, int ttl) throws SQLException
SQLExceptionpublic void insertLinesWithTtlAndReqId(String[] lines, SchemalessProtocolType protocolType, SchemalessTimestampType timestampType, int ttl, long reqId) throws SQLException
SQLExceptionpublic int insertRaw(String line, SchemalessProtocolType protocolType, SchemalessTimestampType timestampType) throws SQLException
SQLExceptionpublic int insertRawWithReqId(String line, SchemalessProtocolType protocolType, SchemalessTimestampType timestampType, long reqId) throws SQLException
SQLExceptionpublic int insertRawWithTtl(String line, SchemalessProtocolType protocolType, SchemalessTimestampType timestampType, int ttl) throws SQLException
SQLExceptionpublic int insertRawWithTtlAndReqId(String line, SchemalessProtocolType protocolType, SchemalessTimestampType timestampType, int ttl, long reqId) throws SQLException
SQLExceptionpublic int getTableVGroupID(String db, String table) throws SQLException
SQLExceptionCopyright © 2023. All rights reserved.