提交 7beef60c 编写于 作者: Z zyyang-taosdata

[TD-1313]<hotfix>: implement getColumns method in the TSDBDatabaseMetadata and...

[TD-1313]<hotfix>: implement getColumns method in the TSDBDatabaseMetadata and update the next method in DatabaseMetaDataResultSet
上级 d08432ea
......@@ -55,6 +55,7 @@
<version>4.13</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
......
......@@ -67,14 +67,23 @@ public class DatabaseMetaDataResultSet implements ResultSet {
@Override
public boolean next() throws SQLException {
// boolean ret = false;
// if (rowDataList.size() > 0) {
// ret = rowDataList.iterator().hasNext();
// if (ret) {
// rowCursor = rowDataList.iterator().next();
// cursorRowNumber++;
// }
// }
// return ret;
/**** add by zyyang 2020-09-29 ****************/
boolean ret = false;
if (rowDataList.size() > 0) {
ret = rowDataList.iterator().hasNext();
if (ret) {
rowCursor = rowDataList.iterator().next();
cursorRowNumber++;
}
if (!rowDataList.isEmpty() && cursorRowNumber < rowDataList.size()) {
rowCursor = rowDataList.get(cursorRowNumber++);
ret = true;
}
return ret;
}
......@@ -91,7 +100,8 @@ public class DatabaseMetaDataResultSet implements ResultSet {
@Override
public String getString(int columnIndex) throws SQLException {
columnIndex--;
return rowCursor.getString(columnIndex, columnMetaDataList.get(columnIndex).getColType());
int colType = columnMetaDataList.get(columnIndex).getColType();
return rowCursor.getString(columnIndex, colType);
}
@Override
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册