类 TSDBJNIConnector
- java.lang.Object
-
- com.taosdata.jdbc.TSDBJNIConnector
-
- 直接已知子类:
TMQConnector
public class TSDBJNIConnector extends Object
JNI connector
-
-
字段概要
字段 修饰符和类型 字段 说明 protected longtaos
-
构造器概要
构造器 构造器 说明 TSDBJNIConnector()
-
方法概要
所有方法 静态方法 实例方法 具体方法 修饰符和类型 方法 说明 voidaddBatch(long stmt)voidbindColumnDataArray(long stmt, ByteBuffer colDataList, ByteBuffer lengthList, ByteBuffer isNullList, int type, int bytes, int numOfRows, int columnIndex)voidcloseBatch(long stmt)voidcloseConnection()Execute close operation from C to release connection pointer by JNIbooleanconnect(String host, int port, String dbName, String user, String password)voidexecuteBatch(long stmt)longexecuteQuery(String sql)Execute DML/DDL operationintfetchBlock(long resultSet, TSDBResultSetBlockData blockData)intfetchRow(long resultSet, TSDBResultSetRowData rowData)Get one row dataintfreeResultSet(long pSql)Free result set operation from C to release result set pointer by JNIintgetAffectedRows(long pSql)Get affected rows countintgetErrCode(long pSql)Get recent error code by connectionStringgetErrMsg(long pSql)Get recent error message by connectionintgetResultTimePrecision(long sqlObj)Get Result Time Precision.intgetSchemaMetaData(long resultSet, List<ColumnMetaData> columnMetaData)Get schema metadatastatic voidinit(Properties props)voidinsertLines(String[] lines, SchemalessProtocolType protocolType, SchemalessTimestampType timestampType)booleanisClosed()booleanisResultsetClosed()booleanisUpdateQuery(long pSql)longprepareStmt(String sql)voidsetBindTableName(long stmt, String tableName)voidsetBindTableNameAndTags(long stmt, String tableName, int numOfTags, ByteBuffer tags, ByteBuffer typeList, ByteBuffer lengthList, ByteBuffer nullList)
-
-
-
方法详细资料
-
init
public static void init(Properties props) throws SQLWarning
- 抛出:
SQLWarning
-
connect
public boolean connect(String host, int port, String dbName, String user, String password) throws SQLException
- 抛出:
SQLException
-
executeQuery
public long executeQuery(String sql) throws SQLException
Execute DML/DDL operation- 抛出:
SQLException
-
getErrCode
public int getErrCode(long pSql)
Get recent error code by connection
-
getErrMsg
public String getErrMsg(long pSql)
Get recent error message by connection
-
isUpdateQuery
public boolean isUpdateQuery(long pSql)
-
isClosed
public boolean isClosed()
-
isResultsetClosed
public boolean isResultsetClosed()
-
freeResultSet
public int freeResultSet(long pSql)
Free result set operation from C to release result set pointer by JNI
-
getAffectedRows
public int getAffectedRows(long pSql)
Get affected rows count
-
getSchemaMetaData
public int getSchemaMetaData(long resultSet, List<ColumnMetaData> columnMetaData)Get schema metadata
-
fetchRow
public int fetchRow(long resultSet, TSDBResultSetRowData rowData)Get one row data
-
fetchBlock
public int fetchBlock(long resultSet, TSDBResultSetBlockData blockData)
-
getResultTimePrecision
public int getResultTimePrecision(long sqlObj)
Get Result Time Precision.- 返回:
- 0: ms, 1: us, 2: ns
-
closeConnection
public void closeConnection() throws SQLExceptionExecute close operation from C to release connection pointer by JNI- 抛出:
SQLException
-
prepareStmt
public long prepareStmt(String sql) throws SQLException
- 抛出:
SQLException
-
setBindTableName
public void setBindTableName(long stmt, String tableName) throws SQLException- 抛出:
SQLException
-
setBindTableNameAndTags
public void setBindTableNameAndTags(long stmt, String tableName, int numOfTags, ByteBuffer tags, ByteBuffer typeList, ByteBuffer lengthList, ByteBuffer nullList) throws SQLException- 抛出:
SQLException
-
bindColumnDataArray
public void bindColumnDataArray(long stmt, ByteBuffer colDataList, ByteBuffer lengthList, ByteBuffer isNullList, int type, int bytes, int numOfRows, int columnIndex) throws SQLException- 抛出:
SQLException
-
executeBatch
public void executeBatch(long stmt) throws SQLException- 抛出:
SQLException
-
addBatch
public void addBatch(long stmt) throws SQLException- 抛出:
SQLException
-
closeBatch
public void closeBatch(long stmt) throws SQLException- 抛出:
SQLException
-
insertLines
public void insertLines(String[] lines, SchemalessProtocolType protocolType, SchemalessTimestampType timestampType) throws SQLException
- 抛出:
SQLException
-
-