Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
慢慢CG
TDengine
提交
cd1bdc74
T
TDengine
项目概览
慢慢CG
/
TDengine
与 Fork 源项目一致
Fork自
taosdata / TDengine
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
TDengine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
cd1bdc74
编写于
2月 25, 2021
作者:
Z
zyyang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
change
上级
9a58d6d8
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
93 addition
and
95 deletion
+93
-95
src/connector/jdbc/src/main/java/com/taosdata/jdbc/AbstractConnection.java
...c/src/main/java/com/taosdata/jdbc/AbstractConnection.java
+2
-2
src/connector/jdbc/src/main/java/com/taosdata/jdbc/DatabaseMetaDataResultSet.java
...ain/java/com/taosdata/jdbc/DatabaseMetaDataResultSet.java
+68
-68
src/connector/jdbc/src/main/java/com/taosdata/jdbc/TSDBJNIConnector.java
...dbc/src/main/java/com/taosdata/jdbc/TSDBJNIConnector.java
+1
-2
src/connector/jdbc/src/main/java/com/taosdata/jdbc/rs/RestfulResultSet.java
.../src/main/java/com/taosdata/jdbc/rs/RestfulResultSet.java
+22
-23
未找到文件。
src/connector/jdbc/src/main/java/com/taosdata/jdbc/AbstractConnection.java
浏览文件 @
cd1bdc74
...
...
@@ -126,9 +126,9 @@ public abstract class AbstractConnection extends WrapperImpl implements Connecti
case
Connection
.
TRANSACTION_READ_COMMITTED
:
case
Connection
.
TRANSACTION_REPEATABLE_READ
:
case
Connection
.
TRANSACTION_SERIALIZABLE
:
throw
new
SQLFeatureNotSupportedException
(
TSDBConstants
.
UNSUPPORTED_METHOD_EXCEPTION_MSG
);
throw
TSDBError
.
createSQLException
(
TSDBErrorNumbers
.
ERROR_UNSUPPORTED_METHOD
);
default
:
throw
new
SQLException
(
TSDBConstants
.
INVALID_VARIABLES
);
throw
TSDBError
.
createSQLException
(
TSDBErrorNumbers
.
ERROR_INVALID_VARIABLE
);
}
//do nothing
}
...
...
src/connector/jdbc/src/main/java/com/taosdata/jdbc/DatabaseMetaDataResultSet.java
浏览文件 @
cd1bdc74
...
...
@@ -160,12 +160,12 @@ public class DatabaseMetaDataResultSet implements ResultSet {
@Override
public
Date
getDate
(
int
columnIndex
)
throws
SQLException
{
throw
new
SQLException
(
TSDBConstants
.
UNSUPPORTED_METHOD_EXCEPTION_MSG
);
throw
TSDBError
.
createSQLException
(
TSDBErrorNumbers
.
ERROR_UNSUPPORTED_METHOD
);
}
@Override
public
Time
getTime
(
int
columnIndex
)
throws
SQLException
{
throw
new
SQLException
(
TSDBConstants
.
UNSUPPORTED_METHOD_EXCEPTION_MSG
);
throw
TSDBError
.
createSQLException
(
TSDBErrorNumbers
.
ERROR_UNSUPPORTED_METHOD
);
}
@Override
...
...
@@ -176,17 +176,17 @@ public class DatabaseMetaDataResultSet implements ResultSet {
@Override
public
InputStream
getAsciiStream
(
int
columnIndex
)
throws
SQLException
{
throw
new
SQLException
(
TSDBConstants
.
UNSUPPORTED_METHOD_EXCEPTION_MSG
);
throw
TSDBError
.
createSQLException
(
TSDBErrorNumbers
.
ERROR_UNSUPPORTED_METHOD
);
}
@Override
public
InputStream
getUnicodeStream
(
int
columnIndex
)
throws
SQLException
{
throw
new
SQLException
(
TSDBConstants
.
UNSUPPORTED_METHOD_EXCEPTION_MSG
);
throw
TSDBError
.
createSQLException
(
TSDBErrorNumbers
.
ERROR_UNSUPPORTED_METHOD
);
}
@Override
public
InputStream
getBinaryStream
(
int
columnIndex
)
throws
SQLException
{
throw
new
SQLException
(
TSDBConstants
.
UNSUPPORTED_METHOD_EXCEPTION_MSG
);
throw
TSDBError
.
createSQLException
(
TSDBErrorNumbers
.
ERROR_UNSUPPORTED_METHOD
);
}
@Override
...
...
@@ -256,22 +256,22 @@ public class DatabaseMetaDataResultSet implements ResultSet {
@Override
public
InputStream
getAsciiStream
(
String
columnLabel
)
throws
SQLException
{
throw
new
SQLException
(
TSDBConstants
.
UNSUPPORTED_METHOD_EXCEPTION_MSG
);
throw
TSDBError
.
createSQLException
(
TSDBErrorNumbers
.
ERROR_UNSUPPORTED_METHOD
);
}
@Override
public
InputStream
getUnicodeStream
(
String
columnLabel
)
throws
SQLException
{
throw
new
SQLException
(
TSDBConstants
.
UNSUPPORTED_METHOD_EXCEPTION_MSG
);
throw
TSDBError
.
createSQLException
(
TSDBErrorNumbers
.
ERROR_UNSUPPORTED_METHOD
);
}
@Override
public
InputStream
getBinaryStream
(
String
columnLabel
)
throws
SQLException
{
throw
new
SQLException
(
TSDBConstants
.
UNSUPPORTED_METHOD_EXCEPTION_MSG
);
throw
TSDBError
.
createSQLException
(
TSDBErrorNumbers
.
ERROR_UNSUPPORTED_METHOD
);
}
@Override
public
SQLWarning
getWarnings
()
throws
SQLException
{
throw
new
SQLException
(
TSDBConstants
.
UNSUPPORTED_METHOD_EXCEPTION_MSG
);
throw
TSDBError
.
createSQLException
(
TSDBErrorNumbers
.
ERROR_UNSUPPORTED_METHOD
);
}
@Override
...
...
@@ -281,7 +281,7 @@ public class DatabaseMetaDataResultSet implements ResultSet {
@Override
public
String
getCursorName
()
throws
SQLException
{
throw
new
SQLException
(
TSDBConstants
.
UNSUPPORTED_METHOD_EXCEPTION_MSG
);
throw
TSDBError
.
createSQLException
(
TSDBErrorNumbers
.
ERROR_UNSUPPORTED_METHOD
);
}
@Override
...
...
@@ -313,12 +313,12 @@ public class DatabaseMetaDataResultSet implements ResultSet {
@Override
public
Reader
getCharacterStream
(
int
columnIndex
)
throws
SQLException
{
throw
new
SQLException
(
TSDBConstants
.
UNSUPPORTED_METHOD_EXCEPTION_MSG
);
throw
TSDBError
.
createSQLException
(
TSDBErrorNumbers
.
ERROR_UNSUPPORTED_METHOD
);
}
@Override
public
Reader
getCharacterStream
(
String
columnLabel
)
throws
SQLException
{
throw
new
SQLException
(
TSDBConstants
.
UNSUPPORTED_METHOD_EXCEPTION_MSG
);
throw
TSDBError
.
createSQLException
(
TSDBErrorNumbers
.
ERROR_UNSUPPORTED_METHOD
);
}
@Override
...
...
@@ -353,22 +353,22 @@ public class DatabaseMetaDataResultSet implements ResultSet {
@Override
public
void
beforeFirst
()
throws
SQLException
{
throw
new
SQLException
(
TSDBConstants
.
UNSUPPORTED_METHOD_EXCEPTION_MSG
);
throw
TSDBError
.
createSQLException
(
TSDBErrorNumbers
.
ERROR_UNSUPPORTED_METHOD
);
}
@Override
public
void
afterLast
()
throws
SQLException
{
throw
new
SQLException
(
TSDBConstants
.
UNSUPPORTED_METHOD_EXCEPTION_MSG
);
throw
TSDBError
.
createSQLException
(
TSDBErrorNumbers
.
ERROR_UNSUPPORTED_METHOD
);
}
@Override
public
boolean
first
()
throws
SQLException
{
throw
new
SQLException
(
TSDBConstants
.
UNSUPPORTED_METHOD_EXCEPTION_MSG
);
throw
TSDBError
.
createSQLException
(
TSDBErrorNumbers
.
ERROR_UNSUPPORTED_METHOD
);
}
@Override
public
boolean
last
()
throws
SQLException
{
throw
new
SQLException
(
TSDBConstants
.
UNSUPPORTED_METHOD_EXCEPTION_MSG
);
throw
TSDBError
.
createSQLException
(
TSDBErrorNumbers
.
ERROR_UNSUPPORTED_METHOD
);
}
@Override
...
...
@@ -383,17 +383,17 @@ public class DatabaseMetaDataResultSet implements ResultSet {
@Override
public
boolean
absolute
(
int
row
)
throws
SQLException
{
throw
new
SQLException
(
TSDBConstants
.
UNSUPPORTED_METHOD_EXCEPTION_MSG
);
throw
TSDBError
.
createSQLException
(
TSDBErrorNumbers
.
ERROR_UNSUPPORTED_METHOD
);
}
@Override
public
boolean
relative
(
int
rows
)
throws
SQLException
{
throw
new
SQLException
(
TSDBConstants
.
UNSUPPORTED_METHOD_EXCEPTION_MSG
);
throw
TSDBError
.
createSQLException
(
TSDBErrorNumbers
.
ERROR_UNSUPPORTED_METHOD
);
}
@Override
public
boolean
previous
()
throws
SQLException
{
throw
new
SQLException
(
TSDBConstants
.
UNSUPPORTED_METHOD_EXCEPTION_MSG
);
throw
TSDBError
.
createSQLException
(
TSDBErrorNumbers
.
ERROR_UNSUPPORTED_METHOD
);
}
@Override
...
...
@@ -443,227 +443,227 @@ public class DatabaseMetaDataResultSet implements ResultSet {
@Override
public
void
updateNull
(
int
columnIndex
)
throws
SQLException
{
throw
new
SQLException
(
TSDBConstants
.
UNSUPPORTED_METHOD_EXCEPTION_MSG
);
throw
TSDBError
.
createSQLException
(
TSDBErrorNumbers
.
ERROR_UNSUPPORTED_METHOD
);
}
@Override
public
void
updateBoolean
(
int
columnIndex
,
boolean
x
)
throws
SQLException
{
throw
new
SQLException
(
TSDBConstants
.
UNSUPPORTED_METHOD_EXCEPTION_MSG
);
throw
TSDBError
.
createSQLException
(
TSDBErrorNumbers
.
ERROR_UNSUPPORTED_METHOD
);
}
@Override
public
void
updateByte
(
int
columnIndex
,
byte
x
)
throws
SQLException
{
throw
new
SQLException
(
TSDBConstants
.
UNSUPPORTED_METHOD_EXCEPTION_MSG
);
throw
TSDBError
.
createSQLException
(
TSDBErrorNumbers
.
ERROR_UNSUPPORTED_METHOD
);
}
@Override
public
void
updateShort
(
int
columnIndex
,
short
x
)
throws
SQLException
{
throw
new
SQLException
(
TSDBConstants
.
UNSUPPORTED_METHOD_EXCEPTION_MSG
);
throw
TSDBError
.
createSQLException
(
TSDBErrorNumbers
.
ERROR_UNSUPPORTED_METHOD
);
}
@Override
public
void
updateInt
(
int
columnIndex
,
int
x
)
throws
SQLException
{
throw
new
SQLException
(
TSDBConstants
.
UNSUPPORTED_METHOD_EXCEPTION_MSG
);
throw
TSDBError
.
createSQLException
(
TSDBErrorNumbers
.
ERROR_UNSUPPORTED_METHOD
);
}
@Override
public
void
updateLong
(
int
columnIndex
,
long
x
)
throws
SQLException
{
throw
new
SQLException
(
TSDBConstants
.
UNSUPPORTED_METHOD_EXCEPTION_MSG
);
throw
TSDBError
.
createSQLException
(
TSDBErrorNumbers
.
ERROR_UNSUPPORTED_METHOD
);
}
@Override
public
void
updateFloat
(
int
columnIndex
,
float
x
)
throws
SQLException
{
throw
new
SQLException
(
TSDBConstants
.
UNSUPPORTED_METHOD_EXCEPTION_MSG
);
throw
TSDBError
.
createSQLException
(
TSDBErrorNumbers
.
ERROR_UNSUPPORTED_METHOD
);
}
@Override
public
void
updateDouble
(
int
columnIndex
,
double
x
)
throws
SQLException
{
throw
new
SQLException
(
TSDBConstants
.
UNSUPPORTED_METHOD_EXCEPTION_MSG
);
throw
TSDBError
.
createSQLException
(
TSDBErrorNumbers
.
ERROR_UNSUPPORTED_METHOD
);
}
@Override
public
void
updateBigDecimal
(
int
columnIndex
,
BigDecimal
x
)
throws
SQLException
{
throw
new
SQLException
(
TSDBConstants
.
UNSUPPORTED_METHOD_EXCEPTION_MSG
);
throw
TSDBError
.
createSQLException
(
TSDBErrorNumbers
.
ERROR_UNSUPPORTED_METHOD
);
}
@Override
public
void
updateString
(
int
columnIndex
,
String
x
)
throws
SQLException
{
throw
new
SQLException
(
TSDBConstants
.
UNSUPPORTED_METHOD_EXCEPTION_MSG
);
throw
TSDBError
.
createSQLException
(
TSDBErrorNumbers
.
ERROR_UNSUPPORTED_METHOD
);
}
@Override
public
void
updateBytes
(
int
columnIndex
,
byte
[]
x
)
throws
SQLException
{
throw
new
SQLException
(
TSDBConstants
.
UNSUPPORTED_METHOD_EXCEPTION_MSG
);
throw
TSDBError
.
createSQLException
(
TSDBErrorNumbers
.
ERROR_UNSUPPORTED_METHOD
);
}
@Override
public
void
updateDate
(
int
columnIndex
,
Date
x
)
throws
SQLException
{
throw
new
SQLException
(
TSDBConstants
.
UNSUPPORTED_METHOD_EXCEPTION_MSG
);
throw
TSDBError
.
createSQLException
(
TSDBErrorNumbers
.
ERROR_UNSUPPORTED_METHOD
);
}
@Override
public
void
updateTime
(
int
columnIndex
,
Time
x
)
throws
SQLException
{
throw
new
SQLException
(
TSDBConstants
.
UNSUPPORTED_METHOD_EXCEPTION_MSG
);
throw
TSDBError
.
createSQLException
(
TSDBErrorNumbers
.
ERROR_UNSUPPORTED_METHOD
);
}
@Override
public
void
updateTimestamp
(
int
columnIndex
,
Timestamp
x
)
throws
SQLException
{
throw
new
SQLException
(
TSDBConstants
.
UNSUPPORTED_METHOD_EXCEPTION_MSG
);
throw
TSDBError
.
createSQLException
(
TSDBErrorNumbers
.
ERROR_UNSUPPORTED_METHOD
);
}
@Override
public
void
updateAsciiStream
(
int
columnIndex
,
InputStream
x
,
int
length
)
throws
SQLException
{
throw
new
SQLException
(
TSDBConstants
.
UNSUPPORTED_METHOD_EXCEPTION_MSG
);
throw
TSDBError
.
createSQLException
(
TSDBErrorNumbers
.
ERROR_UNSUPPORTED_METHOD
);
}
@Override
public
void
updateBinaryStream
(
int
columnIndex
,
InputStream
x
,
int
length
)
throws
SQLException
{
throw
new
SQLException
(
TSDBConstants
.
UNSUPPORTED_METHOD_EXCEPTION_MSG
);
throw
TSDBError
.
createSQLException
(
TSDBErrorNumbers
.
ERROR_UNSUPPORTED_METHOD
);
}
@Override
public
void
updateCharacterStream
(
int
columnIndex
,
Reader
x
,
int
length
)
throws
SQLException
{
throw
new
SQLException
(
TSDBConstants
.
UNSUPPORTED_METHOD_EXCEPTION_MSG
);
throw
TSDBError
.
createSQLException
(
TSDBErrorNumbers
.
ERROR_UNSUPPORTED_METHOD
);
}
@Override
public
void
updateObject
(
int
columnIndex
,
Object
x
,
int
scaleOrLength
)
throws
SQLException
{
throw
new
SQLException
(
TSDBConstants
.
UNSUPPORTED_METHOD_EXCEPTION_MSG
);
throw
TSDBError
.
createSQLException
(
TSDBErrorNumbers
.
ERROR_UNSUPPORTED_METHOD
);
}
@Override
public
void
updateObject
(
int
columnIndex
,
Object
x
)
throws
SQLException
{
throw
new
SQLException
(
TSDBConstants
.
UNSUPPORTED_METHOD_EXCEPTION_MSG
);
throw
TSDBError
.
createSQLException
(
TSDBErrorNumbers
.
ERROR_UNSUPPORTED_METHOD
);
}
@Override
public
void
updateNull
(
String
columnLabel
)
throws
SQLException
{
throw
new
SQLException
(
TSDBConstants
.
UNSUPPORTED_METHOD_EXCEPTION_MSG
);
throw
TSDBError
.
createSQLException
(
TSDBErrorNumbers
.
ERROR_UNSUPPORTED_METHOD
);
}
@Override
public
void
updateBoolean
(
String
columnLabel
,
boolean
x
)
throws
SQLException
{
throw
new
SQLException
(
TSDBConstants
.
UNSUPPORTED_METHOD_EXCEPTION_MSG
);
throw
TSDBError
.
createSQLException
(
TSDBErrorNumbers
.
ERROR_UNSUPPORTED_METHOD
);
}
@Override
public
void
updateByte
(
String
columnLabel
,
byte
x
)
throws
SQLException
{
throw
new
SQLException
(
TSDBConstants
.
UNSUPPORTED_METHOD_EXCEPTION_MSG
);
throw
TSDBError
.
createSQLException
(
TSDBErrorNumbers
.
ERROR_UNSUPPORTED_METHOD
);
}
@Override
public
void
updateShort
(
String
columnLabel
,
short
x
)
throws
SQLException
{
throw
new
SQLException
(
TSDBConstants
.
UNSUPPORTED_METHOD_EXCEPTION_MSG
);
throw
TSDBError
.
createSQLException
(
TSDBErrorNumbers
.
ERROR_UNSUPPORTED_METHOD
);
}
@Override
public
void
updateInt
(
String
columnLabel
,
int
x
)
throws
SQLException
{
throw
new
SQLException
(
TSDBConstants
.
UNSUPPORTED_METHOD_EXCEPTION_MSG
);
throw
TSDBError
.
createSQLException
(
TSDBErrorNumbers
.
ERROR_UNSUPPORTED_METHOD
);
}
@Override
public
void
updateLong
(
String
columnLabel
,
long
x
)
throws
SQLException
{
throw
new
SQLException
(
TSDBConstants
.
UNSUPPORTED_METHOD_EXCEPTION_MSG
);
throw
TSDBError
.
createSQLException
(
TSDBErrorNumbers
.
ERROR_UNSUPPORTED_METHOD
);
}
@Override
public
void
updateFloat
(
String
columnLabel
,
float
x
)
throws
SQLException
{
throw
new
SQLException
(
TSDBConstants
.
UNSUPPORTED_METHOD_EXCEPTION_MSG
);
throw
TSDBError
.
createSQLException
(
TSDBErrorNumbers
.
ERROR_UNSUPPORTED_METHOD
);
}
@Override
public
void
updateDouble
(
String
columnLabel
,
double
x
)
throws
SQLException
{
throw
new
SQLException
(
TSDBConstants
.
UNSUPPORTED_METHOD_EXCEPTION_MSG
);
throw
TSDBError
.
createSQLException
(
TSDBErrorNumbers
.
ERROR_UNSUPPORTED_METHOD
);
}
@Override
public
void
updateBigDecimal
(
String
columnLabel
,
BigDecimal
x
)
throws
SQLException
{
throw
new
SQLException
(
TSDBConstants
.
UNSUPPORTED_METHOD_EXCEPTION_MSG
);
throw
TSDBError
.
createSQLException
(
TSDBErrorNumbers
.
ERROR_UNSUPPORTED_METHOD
);
}
@Override
public
void
updateString
(
String
columnLabel
,
String
x
)
throws
SQLException
{
throw
new
SQLException
(
TSDBConstants
.
UNSUPPORTED_METHOD_EXCEPTION_MSG
);
throw
TSDBError
.
createSQLException
(
TSDBErrorNumbers
.
ERROR_UNSUPPORTED_METHOD
);
}
@Override
public
void
updateBytes
(
String
columnLabel
,
byte
[]
x
)
throws
SQLException
{
throw
new
SQLException
(
TSDBConstants
.
UNSUPPORTED_METHOD_EXCEPTION_MSG
);
throw
TSDBError
.
createSQLException
(
TSDBErrorNumbers
.
ERROR_UNSUPPORTED_METHOD
);
}
@Override
public
void
updateDate
(
String
columnLabel
,
Date
x
)
throws
SQLException
{
throw
new
SQLException
(
TSDBConstants
.
UNSUPPORTED_METHOD_EXCEPTION_MSG
);
throw
TSDBError
.
createSQLException
(
TSDBErrorNumbers
.
ERROR_UNSUPPORTED_METHOD
);
}
@Override
public
void
updateTime
(
String
columnLabel
,
Time
x
)
throws
SQLException
{
throw
new
SQLException
(
TSDBConstants
.
UNSUPPORTED_METHOD_EXCEPTION_MSG
);
throw
TSDBError
.
createSQLException
(
TSDBErrorNumbers
.
ERROR_UNSUPPORTED_METHOD
);
}
@Override
public
void
updateTimestamp
(
String
columnLabel
,
Timestamp
x
)
throws
SQLException
{
throw
new
SQLException
(
TSDBConstants
.
UNSUPPORTED_METHOD_EXCEPTION_MSG
);
throw
TSDBError
.
createSQLException
(
TSDBErrorNumbers
.
ERROR_UNSUPPORTED_METHOD
);
}
@Override
public
void
updateAsciiStream
(
String
columnLabel
,
InputStream
x
,
int
length
)
throws
SQLException
{
throw
new
SQLException
(
TSDBConstants
.
UNSUPPORTED_METHOD_EXCEPTION_MSG
);
throw
TSDBError
.
createSQLException
(
TSDBErrorNumbers
.
ERROR_UNSUPPORTED_METHOD
);
}
@Override
public
void
updateBinaryStream
(
String
columnLabel
,
InputStream
x
,
int
length
)
throws
SQLException
{
throw
new
SQLException
(
TSDBConstants
.
UNSUPPORTED_METHOD_EXCEPTION_MSG
);
throw
TSDBError
.
createSQLException
(
TSDBErrorNumbers
.
ERROR_UNSUPPORTED_METHOD
);
}
@Override
public
void
updateCharacterStream
(
String
columnLabel
,
Reader
reader
,
int
length
)
throws
SQLException
{
throw
new
SQLException
(
TSDBConstants
.
UNSUPPORTED_METHOD_EXCEPTION_MSG
);
throw
TSDBError
.
createSQLException
(
TSDBErrorNumbers
.
ERROR_UNSUPPORTED_METHOD
);
}
@Override
public
void
updateObject
(
String
columnLabel
,
Object
x
,
int
scaleOrLength
)
throws
SQLException
{
throw
new
SQLException
(
TSDBConstants
.
UNSUPPORTED_METHOD_EXCEPTION_MSG
);
throw
TSDBError
.
createSQLException
(
TSDBErrorNumbers
.
ERROR_UNSUPPORTED_METHOD
);
}
@Override
public
void
updateObject
(
String
columnLabel
,
Object
x
)
throws
SQLException
{
throw
new
SQLException
(
TSDBConstants
.
UNSUPPORTED_METHOD_EXCEPTION_MSG
);
throw
TSDBError
.
createSQLException
(
TSDBErrorNumbers
.
ERROR_UNSUPPORTED_METHOD
);
}
@Override
public
void
insertRow
()
throws
SQLException
{
throw
new
SQLException
(
TSDBConstants
.
UNSUPPORTED_METHOD_EXCEPTION_MSG
);
throw
TSDBError
.
createSQLException
(
TSDBErrorNumbers
.
ERROR_UNSUPPORTED_METHOD
);
}
@Override
public
void
updateRow
()
throws
SQLException
{
throw
new
SQLException
(
TSDBConstants
.
UNSUPPORTED_METHOD_EXCEPTION_MSG
);
throw
TSDBError
.
createSQLException
(
TSDBErrorNumbers
.
ERROR_UNSUPPORTED_METHOD
);
}
@Override
public
void
deleteRow
()
throws
SQLException
{
throw
new
SQLException
(
TSDBConstants
.
UNSUPPORTED_METHOD_EXCEPTION_MSG
);
throw
TSDBError
.
createSQLException
(
TSDBErrorNumbers
.
ERROR_UNSUPPORTED_METHOD
);
}
@Override
public
void
refreshRow
()
throws
SQLException
{
throw
new
SQLException
(
TSDBConstants
.
UNSUPPORTED_METHOD_EXCEPTION_MSG
);
throw
TSDBError
.
createSQLException
(
TSDBErrorNumbers
.
ERROR_UNSUPPORTED_METHOD
);
}
@Override
public
void
cancelRowUpdates
()
throws
SQLException
{
throw
new
SQLException
(
TSDBConstants
.
UNSUPPORTED_METHOD_EXCEPTION_MSG
);
throw
TSDBError
.
createSQLException
(
TSDBErrorNumbers
.
ERROR_UNSUPPORTED_METHOD
);
}
@Override
public
void
moveToInsertRow
()
throws
SQLException
{
throw
new
SQLException
(
TSDBConstants
.
UNSUPPORTED_METHOD_EXCEPTION_MSG
);
throw
TSDBError
.
createSQLException
(
TSDBErrorNumbers
.
ERROR_UNSUPPORTED_METHOD
);
}
@Override
public
void
moveToCurrentRow
()
throws
SQLException
{
throw
new
SQLException
(
TSDBConstants
.
UNSUPPORTED_METHOD_EXCEPTION_MSG
);
throw
TSDBError
.
createSQLException
(
TSDBErrorNumbers
.
ERROR_UNSUPPORTED_METHOD
);
}
@Override
...
...
@@ -673,12 +673,12 @@ public class DatabaseMetaDataResultSet implements ResultSet {
@Override
public
Object
getObject
(
int
columnIndex
,
Map
<
String
,
Class
<?>>
map
)
throws
SQLException
{
throw
new
SQLException
(
TSDBConstants
.
UNSUPPORTED_METHOD_EXCEPTION_MSG
);
throw
TSDBError
.
createSQLException
(
TSDBErrorNumbers
.
ERROR_UNSUPPORTED_METHOD
);
}
@Override
public
Ref
getRef
(
int
columnIndex
)
throws
SQLException
{
throw
new
SQLException
(
TSDBConstants
.
UNSUPPORTED_METHOD_EXCEPTION_MSG
);
throw
TSDBError
.
createSQLException
(
TSDBErrorNumbers
.
ERROR_UNSUPPORTED_METHOD
);
}
@Override
...
...
@@ -1043,12 +1043,12 @@ public class DatabaseMetaDataResultSet implements ResultSet {
@Override
public
<
T
>
T
getObject
(
int
columnIndex
,
Class
<
T
>
type
)
throws
SQLException
{
throw
new
SQLException
(
TSDBConstants
.
UNSUPPORTED_METHOD_EXCEPTION_MSG
);
throw
TSDBError
.
createSQLException
(
TSDBErrorNumbers
.
ERROR_UNSUPPORTED_METHOD
);
}
@Override
public
<
T
>
T
getObject
(
String
columnLabel
,
Class
<
T
>
type
)
throws
SQLException
{
throw
new
SQLException
(
TSDBConstants
.
UNSUPPORTED_METHOD_EXCEPTION_MSG
);
throw
TSDBError
.
createSQLException
(
TSDBErrorNumbers
.
ERROR_UNSUPPORTED_METHOD
);
}
@Override
...
...
src/connector/jdbc/src/main/java/com/taosdata/jdbc/TSDBJNIConnector.java
浏览文件 @
cd1bdc74
...
...
@@ -103,7 +103,6 @@ public class TSDBJNIConnector {
this
.
taos
=
this
.
connectImp
(
host
,
port
,
dbName
,
user
,
password
);
if
(
this
.
taos
==
TSDBConstants
.
JNI_NULL_POINTER
)
{
throw
TSDBError
.
createSQLException
(
this
.
getErrCode
(
0
l
),
this
.
getErrMsg
(
0L
));
// throw new SQLException(TSDBConstants.WrapErrMsg(, "", );
}
// invoke connectImp only here
taosInfo
.
conn_open_increment
();
...
...
@@ -274,7 +273,7 @@ public class TSDBJNIConnector {
public
void
closeConnection
()
throws
SQLException
{
int
code
=
this
.
closeConnectionImp
(
this
.
taos
);
if
(
code
<
0
)
{
throw
new
SQLException
(
TSDBConstants
.
FixErrMsg
(
code
),
""
,
this
.
getErrCode
(
0
l
));
throw
TSDBError
.
createSQLException
(
this
.
getErrCode
(
0
l
),
this
.
getErrMsg
(
0L
));
}
else
if
(
code
==
0
)
{
this
.
taos
=
TSDBConstants
.
JNI_NULL_POINTER
;
}
else
{
...
...
src/connector/jdbc/src/main/java/com/taosdata/jdbc/rs/RestfulResultSet.java
浏览文件 @
cd1bdc74
...
...
@@ -106,7 +106,7 @@ public class RestfulResultSet extends AbstractResultSet implements ResultSet {
@Override
public
boolean
next
()
throws
SQLException
{
if
(
isClosed
())
throw
new
SQLException
(
TSDBConstants
.
WrapErrMsg
(
TSDBConstants
.
RESULT_SET_IS_CLOSED
)
);
throw
TSDBError
.
createSQLException
(
TSDBErrorNumbers
.
ERROR_RESULTSET_CLOSED
);
pos
++;
if
(
pos
<=
resultSet
.
size
()
-
1
)
{
return
true
;
...
...
@@ -124,14 +124,14 @@ public class RestfulResultSet extends AbstractResultSet implements ResultSet {
@Override
public
boolean
wasNull
()
throws
SQLException
{
if
(
isClosed
())
throw
new
SQLException
(
TSDBConstants
.
WrapErrMsg
(
TSDBConstants
.
RESULT_SET_IS_CLOSED
)
);
throw
TSDBError
.
createSQLException
(
TSDBErrorNumbers
.
ERROR_RESULTSET_CLOSED
);
return
resultSet
.
isEmpty
();
}
@Override
public
String
getString
(
int
columnIndex
)
throws
SQLException
{
if
(
isClosed
())
throw
new
SQLException
(
TSDBConstants
.
WrapErrMsg
(
TSDBConstants
.
RESULT_SET_IS_CLOSED
)
);
throw
TSDBError
.
createSQLException
(
TSDBErrorNumbers
.
ERROR_RESULTSET_CLOSED
);
if
(
columnIndex
>
resultSet
.
get
(
pos
).
size
())
{
throw
new
SQLException
(
TSDBConstants
.
WrapErrMsg
(
"Column Index out of range, "
+
columnIndex
+
" > "
+
resultSet
.
get
(
pos
).
size
()));
...
...
@@ -144,7 +144,7 @@ public class RestfulResultSet extends AbstractResultSet implements ResultSet {
@Override
public
boolean
getBoolean
(
int
columnIndex
)
throws
SQLException
{
if
(
isClosed
())
throw
new
SQLException
(
TSDBConstants
.
WrapErrMsg
(
TSDBConstants
.
RESULT_SET_IS_CLOSED
)
);
throw
TSDBError
.
createSQLException
(
TSDBErrorNumbers
.
ERROR_RESULTSET_CLOSED
);
columnIndex
=
getTrueColumnIndex
(
columnIndex
);
int
result
=
getInt
(
columnIndex
);
...
...
@@ -154,7 +154,7 @@ public class RestfulResultSet extends AbstractResultSet implements ResultSet {
@Override
public
short
getShort
(
int
columnIndex
)
throws
SQLException
{
if
(
isClosed
())
throw
new
SQLException
(
TSDBConstants
.
WrapErrMsg
(
TSDBConstants
.
RESULT_SET_IS_CLOSED
)
);
throw
TSDBError
.
createSQLException
(
TSDBErrorNumbers
.
ERROR_RESULTSET_CLOSED
);
columnIndex
=
getTrueColumnIndex
(
columnIndex
);
return
Short
.
parseShort
(
resultSet
.
get
(
pos
).
get
(
columnIndex
).
toString
());
}
...
...
@@ -162,7 +162,7 @@ public class RestfulResultSet extends AbstractResultSet implements ResultSet {
@Override
public
int
getInt
(
int
columnIndex
)
throws
SQLException
{
if
(
isClosed
())
throw
new
SQLException
(
TSDBConstants
.
WrapErrMsg
(
TSDBConstants
.
RESULT_SET_IS_CLOSED
)
);
throw
TSDBError
.
createSQLException
(
TSDBErrorNumbers
.
ERROR_RESULTSET_CLOSED
);
columnIndex
=
getTrueColumnIndex
(
columnIndex
);
return
Integer
.
parseInt
(
resultSet
.
get
(
pos
).
get
(
columnIndex
).
toString
());
}
...
...
@@ -170,7 +170,7 @@ public class RestfulResultSet extends AbstractResultSet implements ResultSet {
@Override
public
long
getLong
(
int
columnIndex
)
throws
SQLException
{
if
(
isClosed
())
throw
new
SQLException
(
TSDBConstants
.
WrapErrMsg
(
TSDBConstants
.
RESULT_SET_IS_CLOSED
)
);
throw
TSDBError
.
createSQLException
(
TSDBErrorNumbers
.
ERROR_RESULTSET_CLOSED
);
columnIndex
=
getTrueColumnIndex
(
columnIndex
);
return
Long
.
parseLong
(
resultSet
.
get
(
pos
).
get
(
columnIndex
).
toString
());
}
...
...
@@ -178,7 +178,7 @@ public class RestfulResultSet extends AbstractResultSet implements ResultSet {
@Override
public
float
getFloat
(
int
columnIndex
)
throws
SQLException
{
if
(
isClosed
())
throw
new
SQLException
(
TSDBConstants
.
WrapErrMsg
(
TSDBConstants
.
RESULT_SET_IS_CLOSED
)
);
throw
TSDBError
.
createSQLException
(
TSDBErrorNumbers
.
ERROR_RESULTSET_CLOSED
);
columnIndex
=
getTrueColumnIndex
(
columnIndex
);
return
Float
.
parseFloat
(
resultSet
.
get
(
pos
).
get
(
columnIndex
).
toString
());
}
...
...
@@ -186,7 +186,7 @@ public class RestfulResultSet extends AbstractResultSet implements ResultSet {
@Override
public
double
getDouble
(
int
columnIndex
)
throws
SQLException
{
if
(
isClosed
())
throw
new
SQLException
(
TSDBConstants
.
WrapErrMsg
(
TSDBConstants
.
RESULT_SET_IS_CLOSED
)
);
throw
TSDBError
.
createSQLException
(
TSDBErrorNumbers
.
ERROR_RESULTSET_CLOSED
);
columnIndex
=
getTrueColumnIndex
(
columnIndex
);
return
Double
.
parseDouble
(
resultSet
.
get
(
pos
).
get
(
columnIndex
).
toString
());
...
...
@@ -208,7 +208,7 @@ public class RestfulResultSet extends AbstractResultSet implements ResultSet {
@Override
public
Timestamp
getTimestamp
(
int
columnIndex
)
throws
SQLException
{
if
(
isClosed
())
throw
new
SQLException
(
TSDBConstants
.
WrapErrMsg
(
TSDBConstants
.
RESULT_SET_IS_CLOSED
)
);
throw
TSDBError
.
createSQLException
(
TSDBErrorNumbers
.
ERROR_RESULTSET_CLOSED
);
columnIndex
=
getTrueColumnIndex
(
columnIndex
);
String
strDate
=
resultSet
.
get
(
pos
).
get
(
columnIndex
).
toString
();
...
...
@@ -220,7 +220,7 @@ public class RestfulResultSet extends AbstractResultSet implements ResultSet {
@Override
public
ResultSetMetaData
getMetaData
()
throws
SQLException
{
if
(
isClosed
())
throw
new
SQLException
(
TSDBConstants
.
WrapErrMsg
(
TSDBConstants
.
RESULT_SET_IS_CLOSED
)
);
throw
TSDBError
.
createSQLException
(
TSDBErrorNumbers
.
ERROR_RESULTSET_CLOSED
);
return
this
.
metaData
;
}
...
...
@@ -233,7 +233,7 @@ public class RestfulResultSet extends AbstractResultSet implements ResultSet {
@Override
public
int
findColumn
(
String
columnLabel
)
throws
SQLException
{
if
(
isClosed
())
throw
new
SQLException
(
TSDBConstants
.
WrapErrMsg
(
TSDBConstants
.
RESULT_SET_IS_CLOSED
)
);
throw
TSDBError
.
createSQLException
(
TSDBErrorNumbers
.
ERROR_RESULTSET_CLOSED
);
int
columnIndex
=
columnNames
.
indexOf
(
columnLabel
);
if
(
columnIndex
==
-
1
)
...
...
@@ -244,14 +244,14 @@ public class RestfulResultSet extends AbstractResultSet implements ResultSet {
@Override
public
boolean
isBeforeFirst
()
throws
SQLException
{
if
(
isClosed
())
throw
new
SQLException
(
TSDBConstants
.
WrapErrMsg
(
TSDBConstants
.
RESULT_SET_IS_CLOSED
)
);
throw
TSDBError
.
createSQLException
(
TSDBErrorNumbers
.
ERROR_RESULTSET_CLOSED
);
return
this
.
pos
==
-
1
&&
this
.
resultSet
.
size
()
!=
0
;
}
@Override
public
boolean
isAfterLast
()
throws
SQLException
{
if
(
isClosed
())
throw
new
SQLException
(
TSDBConstants
.
WrapErrMsg
(
TSDBConstants
.
RESULT_SET_IS_CLOSED
)
);
throw
TSDBError
.
createSQLException
(
TSDBErrorNumbers
.
ERROR_RESULTSET_CLOSED
);
return
this
.
pos
>=
resultSet
.
size
()
&&
this
.
resultSet
.
size
()
!=
0
;
}
...
...
@@ -259,14 +259,14 @@ public class RestfulResultSet extends AbstractResultSet implements ResultSet {
@Override
public
boolean
isFirst
()
throws
SQLException
{
if
(
isClosed
())
throw
new
SQLException
(
TSDBConstants
.
WrapErrMsg
(
TSDBConstants
.
RESULT_SET_IS_CLOSED
)
);
throw
TSDBError
.
createSQLException
(
TSDBErrorNumbers
.
ERROR_RESULTSET_CLOSED
);
return
this
.
pos
==
0
;
}
@Override
public
boolean
isLast
()
throws
SQLException
{
if
(
isClosed
())
throw
new
SQLException
(
TSDBConstants
.
WrapErrMsg
(
TSDBConstants
.
RESULT_SET_IS_CLOSED
)
);
throw
TSDBError
.
createSQLException
(
TSDBErrorNumbers
.
ERROR_RESULTSET_CLOSED
);
if
(
this
.
resultSet
.
size
()
==
0
)
return
false
;
return
this
.
pos
==
(
this
.
resultSet
.
size
()
-
1
);
...
...
@@ -275,7 +275,7 @@ public class RestfulResultSet extends AbstractResultSet implements ResultSet {
@Override
public
void
beforeFirst
()
throws
SQLException
{
if
(
isClosed
())
throw
new
SQLException
(
TSDBConstants
.
WrapErrMsg
(
TSDBConstants
.
RESULT_SET_IS_CLOSED
)
);
throw
TSDBError
.
createSQLException
(
TSDBErrorNumbers
.
ERROR_RESULTSET_CLOSED
);
synchronized
(
this
)
{
if
(
this
.
resultSet
.
size
()
>
0
)
{
...
...
@@ -287,7 +287,7 @@ public class RestfulResultSet extends AbstractResultSet implements ResultSet {
@Override
public
void
afterLast
()
throws
SQLException
{
if
(
isClosed
())
throw
new
SQLException
(
TSDBConstants
.
WrapErrMsg
(
TSDBConstants
.
RESULT_SET_IS_CLOSED
)
);
throw
TSDBError
.
createSQLException
(
TSDBErrorNumbers
.
ERROR_RESULTSET_CLOSED
);
synchronized
(
this
)
{
if
(
this
.
resultSet
.
size
()
>
0
)
{
this
.
pos
=
this
.
resultSet
.
size
();
...
...
@@ -298,7 +298,7 @@ public class RestfulResultSet extends AbstractResultSet implements ResultSet {
@Override
public
boolean
first
()
throws
SQLException
{
if
(
isClosed
())
throw
new
SQLException
(
TSDBConstants
.
WrapErrMsg
(
TSDBConstants
.
RESULT_SET_IS_CLOSED
)
);
throw
TSDBError
.
createSQLException
(
TSDBErrorNumbers
.
ERROR_RESULTSET_CLOSED
);
if
(
this
.
resultSet
.
size
()
==
0
)
return
false
;
...
...
@@ -312,7 +312,7 @@ public class RestfulResultSet extends AbstractResultSet implements ResultSet {
@Override
public
boolean
last
()
throws
SQLException
{
if
(
isClosed
())
throw
new
SQLException
(
TSDBConstants
.
WrapErrMsg
(
TSDBConstants
.
RESULT_SET_IS_CLOSED
)
);
throw
TSDBError
.
createSQLException
(
TSDBErrorNumbers
.
ERROR_RESULTSET_CLOSED
);
if
(
this
.
resultSet
.
size
()
==
0
)
return
false
;
synchronized
(
this
)
{
...
...
@@ -324,7 +324,7 @@ public class RestfulResultSet extends AbstractResultSet implements ResultSet {
@Override
public
int
getRow
()
throws
SQLException
{
if
(
isClosed
())
throw
new
SQLException
(
TSDBConstants
.
WrapErrMsg
(
TSDBConstants
.
RESULT_SET_IS_CLOSED
)
);
throw
TSDBError
.
createSQLException
(
TSDBErrorNumbers
.
ERROR_RESULTSET_CLOSED
);
int
row
;
synchronized
(
this
)
{
if
(
this
.
pos
<
0
||
this
.
pos
>=
this
.
resultSet
.
size
())
...
...
@@ -396,7 +396,7 @@ public class RestfulResultSet extends AbstractResultSet implements ResultSet {
@Override
public
Statement
getStatement
()
throws
SQLException
{
if
(
isClosed
())
throw
new
SQLException
(
TSDBConstants
.
WrapErrMsg
(
TSDBConstants
.
RESULT_SET_IS_CLOSED
)
);
throw
TSDBError
.
createSQLException
(
TSDBErrorNumbers
.
ERROR_RESULTSET_CLOSED
);
return
this
.
statement
;
}
...
...
@@ -407,5 +407,4 @@ public class RestfulResultSet extends AbstractResultSet implements ResultSet {
}
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录