From 62cbe4f323775ced1620f544754a2d06ef8212bb Mon Sep 17 00:00:00 2001 From: shenglian zhou Date: Fri, 16 Jul 2021 09:37:46 +0800 Subject: [PATCH] fix jdbc connector compilation error --- .../src/main/java/com/taosdata/jdbc/TSDBJNIConnector.java | 4 ++-- .../src/test/java/com/taosdata/jdbc/TSDBJNIConnectorTest.java | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/connector/jdbc/src/main/java/com/taosdata/jdbc/TSDBJNIConnector.java b/src/connector/jdbc/src/main/java/com/taosdata/jdbc/TSDBJNIConnector.java index 01d2c69ae6..051eca7e10 100755 --- a/src/connector/jdbc/src/main/java/com/taosdata/jdbc/TSDBJNIConnector.java +++ b/src/connector/jdbc/src/main/java/com/taosdata/jdbc/TSDBJNIConnector.java @@ -349,8 +349,8 @@ public class TSDBJNIConnector { private native int closeStmt(long stmt, long con); - public void insertLines(String[] lines) { - int code = insertLines(lines, this.taos); + public void insertLines(String[] lines) throws SQLException { + int code = insertLinesImp(lines, this.taos); if (code != TSDBConstants.JNI_SUCCESS) { throw TSDBError.createSQLException(TSDBErrorNumbers.ERROR_UNKNOWN, "failed to insertLines"); } diff --git a/src/connector/jdbc/src/test/java/com/taosdata/jdbc/TSDBJNIConnectorTest.java b/src/connector/jdbc/src/test/java/com/taosdata/jdbc/TSDBJNIConnectorTest.java index 28c84bd7f1..bbcbd33ebd 100644 --- a/src/connector/jdbc/src/test/java/com/taosdata/jdbc/TSDBJNIConnectorTest.java +++ b/src/connector/jdbc/src/test/java/com/taosdata/jdbc/TSDBJNIConnectorTest.java @@ -117,7 +117,7 @@ public class TSDBJNIConnectorTest { connector.executeQuery("use d"); String[] lines = new String[] {"st,t1=3i64,t2=4f64,t3=\"t3\" c1=3i64,c3=L\"passit\",c2=false,c4=4f64 1626006833639000000ns", "st,t1=4i64,t3=\"t4\",t2=5f64,t4=5f64 c1=3i64,c3=L\"passitagin\",c2=true,c4=5f64,c5=5f64 1626006833640000000ns"}; - connector.insetLines(lines); + connector.insertLines(lines); // close connection connector.closeConnection(); -- GitLab