Merge pull request #3721 from taosdata/feature/TD-1313
[TD-1313]<hotfix>: update TSDBDatabaseMetadata
This commit is contained in:
commit
50af70aaab
|
@ -55,6 +55,7 @@
|
||||||
<version>4.13</version>
|
<version>4.13</version>
|
||||||
<scope>test</scope>
|
<scope>test</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
</dependencies>
|
</dependencies>
|
||||||
<build>
|
<build>
|
||||||
<plugins>
|
<plugins>
|
||||||
|
|
|
@ -67,14 +67,23 @@ public class DatabaseMetaDataResultSet implements ResultSet {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean next() throws SQLException {
|
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;
|
boolean ret = false;
|
||||||
if (rowDataList.size() > 0) {
|
if (!rowDataList.isEmpty() && cursorRowNumber < rowDataList.size()) {
|
||||||
ret = rowDataList.iterator().hasNext();
|
rowCursor = rowDataList.get(cursorRowNumber++);
|
||||||
if (ret) {
|
ret = true;
|
||||||
rowCursor = rowDataList.iterator().next();
|
|
||||||
cursorRowNumber++;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -91,7 +100,8 @@ public class DatabaseMetaDataResultSet implements ResultSet {
|
||||||
@Override
|
@Override
|
||||||
public String getString(int columnIndex) throws SQLException {
|
public String getString(int columnIndex) throws SQLException {
|
||||||
columnIndex--;
|
columnIndex--;
|
||||||
return rowCursor.getString(columnIndex, columnMetaDataList.get(columnIndex).getColType());
|
int colType = columnMetaDataList.get(columnIndex).getColType();
|
||||||
|
return rowCursor.getString(columnIndex, colType);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue