Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
a1c586ba
T
TDengine
项目概览
taosdata
/
TDengine
1 年多 前同步成功
通知
1185
Star
22016
Fork
4786
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
TDengine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
未验证
提交
a1c586ba
编写于
8月 05, 2021
作者:
Z
Zhiyu Yang
提交者:
GitHub
8月 05, 2021
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fix/td 5788 (#7164)
* [TD-5788]<fix>: fix DatabaseMetaData's ResultSet with wrong taos type * change
上级
08ae2881
变更
4
显示空白变更内容
内联
并排
Showing
4 changed file
with
48 addition
and
59 deletion
+48
-59
src/connector/jdbc/src/main/java/com/taosdata/jdbc/AbstractDatabaseMetaData.java
...main/java/com/taosdata/jdbc/AbstractDatabaseMetaData.java
+31
-32
src/connector/jdbc/src/main/java/com/taosdata/jdbc/ColumnMetaData.java
.../jdbc/src/main/java/com/taosdata/jdbc/ColumnMetaData.java
+1
-1
src/connector/jdbc/src/main/java/com/taosdata/jdbc/DatabaseMetaDataResultSet.java
...ain/java/com/taosdata/jdbc/DatabaseMetaDataResultSet.java
+11
-22
src/connector/jdbc/src/main/java/com/taosdata/jdbc/TSDBConstants.java
...r/jdbc/src/main/java/com/taosdata/jdbc/TSDBConstants.java
+5
-4
未找到文件。
src/connector/jdbc/src/main/java/com/taosdata/jdbc/AbstractDatabaseMetaData.java
浏览文件 @
a1c586ba
...
...
@@ -77,8 +77,7 @@ public abstract class AbstractDatabaseMetaData extends WrapperImpl implements Da
}
public
boolean
supportsMixedCaseIdentifiers
()
throws
SQLException
{
//像database、table这些对象的标识符,在存储时是否采用大小写混合的模式
return
false
;
return
false
;
//像database、table这些对象的标识符,在存储时是否采用大小写混合的模式
}
public
boolean
storesUpperCaseIdentifiers
()
throws
SQLException
{
...
...
@@ -514,7 +513,7 @@ public abstract class AbstractDatabaseMetaData extends WrapperImpl implements Da
ColumnMetaData
col6
=
new
ColumnMetaData
();
col6
.
setColIndex
(
colIndex
);
col6
.
setColName
(
"TYPE_CAT"
);
col6
.
setColType
(
T
ypes
.
NCHAR
);
col6
.
setColType
(
T
SDBConstants
.
TSDB_DATA_TYPE_
NCHAR
);
return
col6
;
}
...
...
@@ -522,7 +521,7 @@ public abstract class AbstractDatabaseMetaData extends WrapperImpl implements Da
ColumnMetaData
col7
=
new
ColumnMetaData
();
col7
.
setColIndex
(
colIndex
);
col7
.
setColName
(
"TYPE_SCHEM"
);
col7
.
setColType
(
T
ypes
.
NCHAR
);
col7
.
setColType
(
T
SDBConstants
.
TSDB_DATA_TYPE_
NCHAR
);
return
col7
;
}
...
...
@@ -530,7 +529,7 @@ public abstract class AbstractDatabaseMetaData extends WrapperImpl implements Da
ColumnMetaData
col8
=
new
ColumnMetaData
();
col8
.
setColIndex
(
colIndex
);
col8
.
setColName
(
"TYPE_NAME"
);
col8
.
setColType
(
T
ypes
.
NCHAR
);
col8
.
setColType
(
T
SDBConstants
.
TSDB_DATA_TYPE_
NCHAR
);
return
col8
;
}
...
...
@@ -538,7 +537,7 @@ public abstract class AbstractDatabaseMetaData extends WrapperImpl implements Da
ColumnMetaData
col9
=
new
ColumnMetaData
();
col9
.
setColIndex
(
colIndex
);
col9
.
setColName
(
"SELF_REFERENCING_COL_NAME"
);
col9
.
setColType
(
T
ypes
.
NCHAR
);
col9
.
setColType
(
T
SDBConstants
.
TSDB_DATA_TYPE_
NCHAR
);
return
col9
;
}
...
...
@@ -546,7 +545,7 @@ public abstract class AbstractDatabaseMetaData extends WrapperImpl implements Da
ColumnMetaData
col10
=
new
ColumnMetaData
();
col10
.
setColIndex
(
colIndex
);
col10
.
setColName
(
"REF_GENERATION"
);
col10
.
setColType
(
T
ypes
.
NCHAR
);
col10
.
setColType
(
T
SDBConstants
.
TSDB_DATA_TYPE_
NCHAR
);
return
col10
;
}
...
...
@@ -592,7 +591,7 @@ public abstract class AbstractDatabaseMetaData extends WrapperImpl implements Da
ColumnMetaData
col4
=
new
ColumnMetaData
();
col4
.
setColIndex
(
colIndex
);
col4
.
setColName
(
"TABLE_TYPE"
);
col4
.
setColType
(
T
ypes
.
NCHAR
);
col4
.
setColType
(
T
SDBConstants
.
TSDB_DATA_TYPE_
NCHAR
);
return
col4
;
}
...
...
@@ -734,7 +733,7 @@ public abstract class AbstractDatabaseMetaData extends WrapperImpl implements Da
ColumnMetaData
col1
=
new
ColumnMetaData
();
col1
.
setColIndex
(
colIndex
);
col1
.
setColName
(
"TABLE_CAT"
);
col1
.
setColType
(
T
ypes
.
NCHAR
);
col1
.
setColType
(
T
SDBConstants
.
TSDB_DATA_TYPE_
NCHAR
);
return
col1
;
}
...
...
@@ -742,7 +741,7 @@ public abstract class AbstractDatabaseMetaData extends WrapperImpl implements Da
ColumnMetaData
col2
=
new
ColumnMetaData
();
col2
.
setColIndex
(
colIndex
);
col2
.
setColName
(
"TABLE_SCHEM"
);
col2
.
setColType
(
T
ypes
.
NCHAR
);
col2
.
setColType
(
T
SDBConstants
.
TSDB_DATA_TYPE_
NCHAR
);
return
col2
;
}
...
...
@@ -751,7 +750,7 @@ public abstract class AbstractDatabaseMetaData extends WrapperImpl implements Da
col3
.
setColIndex
(
colIndex
);
col3
.
setColName
(
"TABLE_NAME"
);
col3
.
setColSize
(
193
);
col3
.
setColType
(
T
ypes
.
NCHAR
);
col3
.
setColType
(
T
SDBConstants
.
TSDB_DATA_TYPE_
NCHAR
);
return
col3
;
}
...
...
@@ -760,7 +759,7 @@ public abstract class AbstractDatabaseMetaData extends WrapperImpl implements Da
col4
.
setColIndex
(
colIndex
);
col4
.
setColName
(
"COLUMN_NAME"
);
col4
.
setColSize
(
65
);
col4
.
setColType
(
T
ypes
.
NCHAR
);
col4
.
setColType
(
T
SDBConstants
.
TSDB_DATA_TYPE_
NCHAR
);
return
col4
;
}
...
...
@@ -768,7 +767,7 @@ public abstract class AbstractDatabaseMetaData extends WrapperImpl implements Da
ColumnMetaData
col5
=
new
ColumnMetaData
();
col5
.
setColIndex
(
colIndex
);
col5
.
setColName
(
"DATA_TYPE"
);
col5
.
setColType
(
T
ypes
.
INTEGER
);
col5
.
setColType
(
T
SDBConstants
.
TSDB_DATA_TYPE_INT
);
return
col5
;
}
...
...
@@ -776,7 +775,7 @@ public abstract class AbstractDatabaseMetaData extends WrapperImpl implements Da
ColumnMetaData
col7
=
new
ColumnMetaData
();
col7
.
setColIndex
(
7
);
col7
.
setColName
(
"COLUMN_SIZE"
);
col7
.
setColType
(
T
ypes
.
INTEGER
);
col7
.
setColType
(
T
SDBConstants
.
TSDB_DATA_TYPE_INT
);
return
col7
;
}
...
...
@@ -791,7 +790,7 @@ public abstract class AbstractDatabaseMetaData extends WrapperImpl implements Da
ColumnMetaData
col9
=
new
ColumnMetaData
();
col9
.
setColIndex
(
9
);
col9
.
setColName
(
"DECIMAL_DIGITS"
);
col9
.
setColType
(
T
ypes
.
INTEGER
);
col9
.
setColType
(
T
SDBConstants
.
TSDB_DATA_TYPE_INT
);
return
col9
;
}
...
...
@@ -799,7 +798,7 @@ public abstract class AbstractDatabaseMetaData extends WrapperImpl implements Da
ColumnMetaData
col10
=
new
ColumnMetaData
();
col10
.
setColIndex
(
10
);
col10
.
setColName
(
"NUM_PREC_RADIX"
);
col10
.
setColType
(
T
ypes
.
INTEGER
);
col10
.
setColType
(
T
SDBConstants
.
TSDB_DATA_TYPE_INT
);
return
col10
;
}
...
...
@@ -807,7 +806,7 @@ public abstract class AbstractDatabaseMetaData extends WrapperImpl implements Da
ColumnMetaData
col11
=
new
ColumnMetaData
();
col11
.
setColIndex
(
11
);
col11
.
setColName
(
"NULLABLE"
);
col11
.
setColType
(
T
ypes
.
INTEGER
);
col11
.
setColType
(
T
SDBConstants
.
TSDB_DATA_TYPE_INT
);
return
col11
;
}
...
...
@@ -815,7 +814,7 @@ public abstract class AbstractDatabaseMetaData extends WrapperImpl implements Da
ColumnMetaData
col12
=
new
ColumnMetaData
();
col12
.
setColIndex
(
colIndex
);
col12
.
setColName
(
"REMARKS"
);
col12
.
setColType
(
T
ypes
.
NCHAR
);
col12
.
setColType
(
T
SDBConstants
.
TSDB_DATA_TYPE_
NCHAR
);
return
col12
;
}
...
...
@@ -823,7 +822,7 @@ public abstract class AbstractDatabaseMetaData extends WrapperImpl implements Da
ColumnMetaData
col13
=
new
ColumnMetaData
();
col13
.
setColIndex
(
13
);
col13
.
setColName
(
"COLUMN_DEF"
);
col13
.
setColType
(
T
ypes
.
NCHAR
);
col13
.
setColType
(
T
SDBConstants
.
TSDB_DATA_TYPE_
NCHAR
);
return
col13
;
}
...
...
@@ -831,7 +830,7 @@ public abstract class AbstractDatabaseMetaData extends WrapperImpl implements Da
ColumnMetaData
col14
=
new
ColumnMetaData
();
col14
.
setColIndex
(
14
);
col14
.
setColName
(
"SQL_DATA_TYPE"
);
col14
.
setColType
(
T
ypes
.
INTEGER
);
col14
.
setColType
(
T
SDBConstants
.
TSDB_DATA_TYPE_INT
);
return
col14
;
}
...
...
@@ -839,7 +838,7 @@ public abstract class AbstractDatabaseMetaData extends WrapperImpl implements Da
ColumnMetaData
col15
=
new
ColumnMetaData
();
col15
.
setColIndex
(
15
);
col15
.
setColName
(
"SQL_DATETIME_SUB"
);
col15
.
setColType
(
T
ypes
.
INTEGER
);
col15
.
setColType
(
T
SDBConstants
.
TSDB_DATA_TYPE_INT
);
return
col15
;
}
...
...
@@ -847,7 +846,7 @@ public abstract class AbstractDatabaseMetaData extends WrapperImpl implements Da
ColumnMetaData
col16
=
new
ColumnMetaData
();
col16
.
setColIndex
(
16
);
col16
.
setColName
(
"CHAR_OCTET_LENGTH"
);
col16
.
setColType
(
T
ypes
.
INTEGER
);
col16
.
setColType
(
T
SDBConstants
.
TSDB_DATA_TYPE_INT
);
return
col16
;
}
...
...
@@ -855,7 +854,7 @@ public abstract class AbstractDatabaseMetaData extends WrapperImpl implements Da
ColumnMetaData
col17
=
new
ColumnMetaData
();
col17
.
setColIndex
(
17
);
col17
.
setColName
(
"ORDINAL_POSITION"
);
col17
.
setColType
(
T
ypes
.
INTEGER
);
col17
.
setColType
(
T
SDBConstants
.
TSDB_DATA_TYPE_INT
);
return
col17
;
}
...
...
@@ -863,7 +862,7 @@ public abstract class AbstractDatabaseMetaData extends WrapperImpl implements Da
ColumnMetaData
col18
=
new
ColumnMetaData
();
col18
.
setColIndex
(
18
);
col18
.
setColName
(
"IS_NULLABLE"
);
col18
.
setColType
(
T
ypes
.
NCHAR
);
col18
.
setColType
(
T
SDBConstants
.
TSDB_DATA_TYPE_
NCHAR
);
return
col18
;
}
...
...
@@ -871,7 +870,7 @@ public abstract class AbstractDatabaseMetaData extends WrapperImpl implements Da
ColumnMetaData
col19
=
new
ColumnMetaData
();
col19
.
setColIndex
(
19
);
col19
.
setColName
(
"SCOPE_CATALOG"
);
col19
.
setColType
(
T
ypes
.
NCHAR
);
col19
.
setColType
(
T
SDBConstants
.
TSDB_DATA_TYPE_
NCHAR
);
return
col19
;
}
...
...
@@ -879,7 +878,7 @@ public abstract class AbstractDatabaseMetaData extends WrapperImpl implements Da
ColumnMetaData
col20
=
new
ColumnMetaData
();
col20
.
setColIndex
(
20
);
col20
.
setColName
(
"SCOPE_SCHEMA"
);
col20
.
setColType
(
T
ypes
.
NCHAR
);
col20
.
setColType
(
T
SDBConstants
.
TSDB_DATA_TYPE_
NCHAR
);
return
col20
;
}
...
...
@@ -887,7 +886,7 @@ public abstract class AbstractDatabaseMetaData extends WrapperImpl implements Da
ColumnMetaData
col21
=
new
ColumnMetaData
();
col21
.
setColIndex
(
21
);
col21
.
setColName
(
"SCOPE_TABLE"
);
col21
.
setColType
(
T
ypes
.
NCHAR
);
col21
.
setColType
(
T
SDBConstants
.
TSDB_DATA_TYPE_
NCHAR
);
return
col21
;
}
...
...
@@ -903,7 +902,7 @@ public abstract class AbstractDatabaseMetaData extends WrapperImpl implements Da
ColumnMetaData
col23
=
new
ColumnMetaData
();
col23
.
setColIndex
(
23
);
col23
.
setColName
(
"IS_AUTOINCREMENT"
);
col23
.
setColType
(
T
ypes
.
NCHAR
);
col23
.
setColType
(
T
SDBConstants
.
TSDB_DATA_TYPE_
NCHAR
);
return
col23
;
}
...
...
@@ -911,7 +910,7 @@ public abstract class AbstractDatabaseMetaData extends WrapperImpl implements Da
ColumnMetaData
col24
=
new
ColumnMetaData
();
col24
.
setColIndex
(
24
);
col24
.
setColName
(
"IS_GENERATEDCOLUMN"
);
col24
.
setColType
(
T
ypes
.
NCHAR
);
col24
.
setColType
(
T
SDBConstants
.
TSDB_DATA_TYPE_
NCHAR
);
return
col24
;
}
...
...
@@ -1205,7 +1204,7 @@ public abstract class AbstractDatabaseMetaData extends WrapperImpl implements Da
ColumnMetaData
col5
=
new
ColumnMetaData
();
col5
.
setColIndex
(
colIndex
);
col5
.
setColName
(
"KEY_SEQ"
);
col5
.
setColType
(
T
ypes
.
SMALLINT
);
col5
.
setColType
(
T
SDBConstants
.
TSDB_DATA_TYPE_
SMALLINT
);
return
col5
;
}
...
...
@@ -1213,7 +1212,7 @@ public abstract class AbstractDatabaseMetaData extends WrapperImpl implements Da
ColumnMetaData
col6
=
new
ColumnMetaData
();
col6
.
setColIndex
(
colIndex
);
col6
.
setColName
(
"PK_NAME"
);
col6
.
setColType
(
T
ypes
.
NCHAR
);
col6
.
setColType
(
T
SDBConstants
.
TSDB_DATA_TYPE_
NCHAR
);
return
col6
;
}
...
...
@@ -1275,7 +1274,7 @@ public abstract class AbstractDatabaseMetaData extends WrapperImpl implements Da
ColumnMetaData
col4
=
new
ColumnMetaData
();
col4
.
setColIndex
(
colIndex
);
col4
.
setColName
(
"SUPERTABLE_NAME"
);
col4
.
setColType
(
T
ypes
.
NCHAR
);
col4
.
setColType
(
T
SDBConstants
.
TSDB_DATA_TYPE_
NCHAR
);
return
col4
;
}
...
...
src/connector/jdbc/src/main/java/com/taosdata/jdbc/ColumnMetaData.java
浏览文件 @
a1c586ba
...
...
@@ -16,7 +16,7 @@ package com.taosdata.jdbc;
public
class
ColumnMetaData
{
private
int
colType
=
0
;
private
int
colType
=
0
;
//taosType
private
String
colName
=
null
;
private
int
colSize
=
-
1
;
private
int
colIndex
=
0
;
...
...
src/connector/jdbc/src/main/java/com/taosdata/jdbc/DatabaseMetaDataResultSet.java
浏览文件 @
a1c586ba
...
...
@@ -68,71 +68,61 @@ public class DatabaseMetaDataResultSet extends AbstractResultSet {
@Override
public
String
getString
(
int
columnIndex
)
throws
SQLException
{
int
colType
=
columnMetaDataList
.
get
(
columnIndex
-
1
).
getColType
();
int
nativeType
=
TSDBConstants
.
jdbcType2TaosType
(
colType
);
return
rowCursor
.
getString
(
columnIndex
,
nativeType
);
return
rowCursor
.
getString
(
columnIndex
,
colType
);
}
@Override
public
boolean
getBoolean
(
int
columnIndex
)
throws
SQLException
{
int
colType
=
columnMetaDataList
.
get
(
columnIndex
-
1
).
getColType
();
int
nativeType
=
TSDBConstants
.
jdbcType2TaosType
(
colType
);
return
rowCursor
.
getBoolean
(
columnIndex
,
nativeType
);
return
rowCursor
.
getBoolean
(
columnIndex
,
colType
);
}
@Override
public
byte
getByte
(
int
columnIndex
)
throws
SQLException
{
int
colType
=
columnMetaDataList
.
get
(
columnIndex
-
1
).
getColType
();
int
nativeType
=
TSDBConstants
.
jdbcType2TaosType
(
colType
);
return
(
byte
)
rowCursor
.
getInt
(
columnIndex
,
nativeType
);
return
(
byte
)
rowCursor
.
getInt
(
columnIndex
,
colType
);
}
@Override
public
short
getShort
(
int
columnIndex
)
throws
SQLException
{
int
colType
=
columnMetaDataList
.
get
(
columnIndex
-
1
).
getColType
();
int
nativeType
=
TSDBConstants
.
jdbcType2TaosType
(
colType
);
return
(
short
)
rowCursor
.
getInt
(
columnIndex
,
nativeType
);
return
(
short
)
rowCursor
.
getInt
(
columnIndex
,
colType
);
}
@Override
public
int
getInt
(
int
columnIndex
)
throws
SQLException
{
int
colType
=
columnMetaDataList
.
get
(
columnIndex
-
1
).
getColType
();
int
nativeType
=
TSDBConstants
.
jdbcType2TaosType
(
colType
);
return
rowCursor
.
getInt
(
columnIndex
,
nativeType
);
return
rowCursor
.
getInt
(
columnIndex
,
colType
);
}
@Override
public
long
getLong
(
int
columnIndex
)
throws
SQLException
{
int
colType
=
columnMetaDataList
.
get
(
columnIndex
-
1
).
getColType
();
int
nativeType
=
TSDBConstants
.
jdbcType2TaosType
(
colType
);
return
rowCursor
.
getLong
(
columnIndex
,
nativeType
);
return
rowCursor
.
getLong
(
columnIndex
,
colType
);
}
@Override
public
float
getFloat
(
int
columnIndex
)
throws
SQLException
{
int
colType
=
columnMetaDataList
.
get
(
columnIndex
-
1
).
getColType
();
int
nativeType
=
TSDBConstants
.
jdbcType2TaosType
(
colType
);
return
rowCursor
.
getFloat
(
columnIndex
,
nativeType
);
return
rowCursor
.
getFloat
(
columnIndex
,
colType
);
}
@Override
public
double
getDouble
(
int
columnIndex
)
throws
SQLException
{
int
colType
=
columnMetaDataList
.
get
(
columnIndex
-
1
).
getColType
();
int
nativeType
=
TSDBConstants
.
jdbcType2TaosType
(
colType
);
return
rowCursor
.
getDouble
(
columnIndex
,
nativeType
);
return
rowCursor
.
getDouble
(
columnIndex
,
colType
);
}
@Override
public
byte
[]
getBytes
(
int
columnIndex
)
throws
SQLException
{
int
colType
=
columnMetaDataList
.
get
(
columnIndex
-
1
).
getColType
();
int
nativeType
=
TSDBConstants
.
jdbcType2TaosType
(
colType
);
return
(
rowCursor
.
getString
(
columnIndex
,
nativeType
)).
getBytes
();
return
(
rowCursor
.
getString
(
columnIndex
,
colType
)).
getBytes
();
}
@Override
public
Timestamp
getTimestamp
(
int
columnIndex
)
throws
SQLException
{
int
colType
=
columnMetaDataList
.
get
(
columnIndex
-
1
).
getColType
();
int
nativeType
=
TSDBConstants
.
jdbcType2TaosType
(
colType
);
return
rowCursor
.
getTimestamp
(
columnIndex
,
nativeType
);
return
rowCursor
.
getTimestamp
(
columnIndex
,
colType
);
}
@Override
...
...
@@ -158,8 +148,7 @@ public class DatabaseMetaDataResultSet extends AbstractResultSet {
@Override
public
BigDecimal
getBigDecimal
(
int
columnIndex
)
throws
SQLException
{
int
colType
=
columnMetaDataList
.
get
(
columnIndex
-
1
).
getColType
();
int
nativeType
=
TSDBConstants
.
jdbcType2TaosType
(
colType
);
double
value
=
rowCursor
.
getDouble
(
columnIndex
,
nativeType
);
double
value
=
rowCursor
.
getDouble
(
columnIndex
,
colType
);
return
new
BigDecimal
(
value
);
}
...
...
src/connector/jdbc/src/main/java/com/taosdata/jdbc/TSDBConstants.java
浏览文件 @
a1c586ba
...
...
@@ -129,8 +129,9 @@ public abstract class TSDBConstants {
return
Types
.
TIMESTAMP
;
case
TSDBConstants
.
TSDB_DATA_TYPE_NCHAR
:
return
Types
.
NCHAR
;
default
:
throw
TSDBError
.
createSQLException
(
TSDBErrorNumbers
.
ERROR_UNKNOWN_TAOS_TYPE
,
"unknown taos type: "
+
taosType
+
" in tdengine"
);
}
throw
TSDBError
.
createSQLException
(
TSDBErrorNumbers
.
ERROR_UNKNOWN_TAOS_TYPE
);
}
public
static
String
taosType2JdbcTypeName
(
int
taosType
)
throws
SQLException
{
...
...
@@ -160,7 +161,7 @@ public abstract class TSDBConstants {
case
TSDBConstants
.
TSDB_DATA_TYPE_NCHAR
:
return
"NCHAR"
;
default
:
throw
TSDBError
.
createSQLException
(
TSDBErrorNumbers
.
ERROR_UNKNOWN_TAOS_TYPE
);
throw
TSDBError
.
createSQLException
(
TSDBErrorNumbers
.
ERROR_UNKNOWN_TAOS_TYPE
,
"unknown taos type: "
+
taosType
+
" in tdengine"
);
}
}
...
...
@@ -187,7 +188,7 @@ public abstract class TSDBConstants {
case
Types
.
NCHAR
:
return
TSDBConstants
.
TSDB_DATA_TYPE_NCHAR
;
}
throw
TSDBError
.
createSQLException
(
TSDBErrorNumbers
.
ERROR_UNKNOWN_SQL_TYPE_IN_TDENGINE
);
throw
TSDBError
.
createSQLException
(
TSDBErrorNumbers
.
ERROR_UNKNOWN_SQL_TYPE_IN_TDENGINE
,
"unknown sql type: "
+
jdbcType
+
" in tdengine"
);
}
public
static
String
jdbcType2TaosTypeName
(
int
jdbcType
)
throws
SQLException
{
...
...
@@ -213,7 +214,7 @@ public abstract class TSDBConstants {
case
Types
.
NCHAR
:
return
"NCHAR"
;
default
:
throw
TSDBError
.
createSQLException
(
TSDBErrorNumbers
.
ERROR_UNKNOWN_SQL_TYPE_IN_TDENGINE
);
throw
TSDBError
.
createSQLException
(
TSDBErrorNumbers
.
ERROR_UNKNOWN_SQL_TYPE_IN_TDENGINE
,
"unknown sql type: "
+
jdbcType
+
" in tdengine"
);
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录