change
This commit is contained in:
parent
d8c02c10db
commit
ff370c2471
|
@ -32,7 +32,7 @@ ELSEIF (TD_WINDOWS)
|
|||
#INSTALL(TARGETS taos RUNTIME DESTINATION driver)
|
||||
#INSTALL(TARGETS shell RUNTIME DESTINATION .)
|
||||
IF (TD_MVN_INSTALLED)
|
||||
INSTALL(FILES ${LIBRARY_OUTPUT_PATH}/taos-jdbcdriver-2.0.20-dist.jar DESTINATION connector/jdbc)
|
||||
INSTALL(FILES ${LIBRARY_OUTPUT_PATH}/taos-jdbcdriver-2.0.21-dist.jar DESTINATION connector/jdbc)
|
||||
ENDIF ()
|
||||
ELSEIF (TD_DARWIN)
|
||||
SET(TD_MAKE_INSTALL_SH "${TD_COMMUNITY_DIR}/packaging/tools/make_install.sh")
|
||||
|
|
|
@ -8,7 +8,7 @@ IF (TD_MVN_INSTALLED)
|
|||
ADD_CUSTOM_COMMAND(OUTPUT ${JDBC_CMD_NAME}
|
||||
POST_BUILD
|
||||
COMMAND mvn -Dmaven.test.skip=true install -f ${CMAKE_CURRENT_SOURCE_DIR}/pom.xml
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/target/taos-jdbcdriver-2.0.20-dist.jar ${LIBRARY_OUTPUT_PATH}
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/target/taos-jdbcdriver-2.0.21-dist.jar ${LIBRARY_OUTPUT_PATH}
|
||||
COMMAND mvn -Dmaven.test.skip=true clean -f ${CMAKE_CURRENT_SOURCE_DIR}/pom.xml
|
||||
COMMENT "build jdbc driver")
|
||||
ADD_CUSTOM_TARGET(${JDBC_TARGET_NAME} ALL WORKING_DIRECTORY ${EXECUTABLE_OUTPUT_PATH} DEPENDS ${JDBC_CMD_NAME})
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
|
||||
<groupId>com.taosdata.jdbc</groupId>
|
||||
<artifactId>taos-jdbcdriver</artifactId>
|
||||
<version>2.0.20</version>
|
||||
<version>2.0.21</version>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<name>JDBCDriver</name>
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>com.taosdata.jdbc</groupId>
|
||||
<artifactId>taos-jdbcdriver</artifactId>
|
||||
<version>2.0.20</version>
|
||||
<version>2.0.21</version>
|
||||
<packaging>jar</packaging>
|
||||
<name>JDBCDriver</name>
|
||||
<url>https://github.com/taosdata/TDengine/tree/master/src/connector/jdbc</url>
|
||||
|
|
|
@ -50,26 +50,26 @@ public class SubscribeTest {
|
|||
try {
|
||||
String rawSql = "select * from " + dbName + "." + tName + ";";
|
||||
System.out.println(rawSql);
|
||||
TSDBSubscribe subscribe = ((TSDBConnection) connection).subscribe(topic, rawSql, false);
|
||||
// TSDBSubscribe subscribe = ((TSDBConnection) connection).subscribe(topic, rawSql, false);
|
||||
|
||||
int a = 0;
|
||||
while (true) {
|
||||
TimeUnit.MILLISECONDS.sleep(1000);
|
||||
TSDBResultSet resSet = subscribe.consume();
|
||||
while (resSet.next()) {
|
||||
for (int i = 1; i <= resSet.getMetaData().getColumnCount(); i++) {
|
||||
System.out.printf(i + ": " + resSet.getString(i) + "\t");
|
||||
}
|
||||
System.out.println("\n======" + a + "==========");
|
||||
}
|
||||
a++;
|
||||
if (a >= 2) {
|
||||
break;
|
||||
}
|
||||
resSet.close();
|
||||
}
|
||||
|
||||
subscribe.close(true);
|
||||
// int a = 0;
|
||||
// while (true) {
|
||||
// TimeUnit.MILLISECONDS.sleep(1000);
|
||||
// TSDBResultSet resSet = subscribe.consume();
|
||||
// while (resSet.next()) {
|
||||
// for (int i = 1; i <= resSet.getMetaData().getColumnCount(); i++) {
|
||||
// System.out.printf(i + ": " + resSet.getString(i) + "\t");
|
||||
// }
|
||||
// System.out.println("\n======" + a + "==========");
|
||||
// }
|
||||
// a++;
|
||||
// if (a >= 2) {
|
||||
// break;
|
||||
// }
|
||||
// resSet.close();
|
||||
// }
|
||||
//
|
||||
// subscribe.close(true);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
|
|
@ -9,8 +9,8 @@ import java.util.Random;
|
|||
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
|
||||
public class RestfulJDBCTest {
|
||||
|
||||
// private static final String host = "127.0.0.1";
|
||||
private static final String host = "master";
|
||||
private static final String host = "127.0.0.1";
|
||||
// private static final String host = "master";
|
||||
private static Connection connection;
|
||||
private Random random = new Random(System.currentTimeMillis());
|
||||
|
||||
|
|
|
@ -11,8 +11,8 @@ import java.sql.*;
|
|||
|
||||
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
|
||||
public class SQLTest {
|
||||
// private static final String host = "127.0.0.1";
|
||||
private static final String host = "master";
|
||||
private static final String host = "127.0.0.1";
|
||||
// private static final String host = "master";
|
||||
private static Connection connection;
|
||||
|
||||
@Test
|
||||
|
|
Loading…
Reference in New Issue