change
This commit is contained in:
parent
bc5fc8cc8b
commit
dd3115358a
|
@ -32,7 +32,7 @@ ELSEIF (TD_WINDOWS)
|
||||||
#INSTALL(TARGETS taos RUNTIME DESTINATION driver)
|
#INSTALL(TARGETS taos RUNTIME DESTINATION driver)
|
||||||
#INSTALL(TARGETS shell RUNTIME DESTINATION .)
|
#INSTALL(TARGETS shell RUNTIME DESTINATION .)
|
||||||
IF (TD_MVN_INSTALLED)
|
IF (TD_MVN_INSTALLED)
|
||||||
INSTALL(FILES ${LIBRARY_OUTPUT_PATH}/taos-jdbcdriver-2.0.17-dist.jar DESTINATION connector/jdbc)
|
INSTALL(FILES ${LIBRARY_OUTPUT_PATH}/taos-jdbcdriver-2.0.18-dist.jar DESTINATION connector/jdbc)
|
||||||
ENDIF ()
|
ENDIF ()
|
||||||
ELSEIF (TD_DARWIN)
|
ELSEIF (TD_DARWIN)
|
||||||
SET(TD_MAKE_INSTALL_SH "${TD_COMMUNITY_DIR}/packaging/tools/make_install.sh")
|
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}
|
ADD_CUSTOM_COMMAND(OUTPUT ${JDBC_CMD_NAME}
|
||||||
POST_BUILD
|
POST_BUILD
|
||||||
COMMAND mvn -Dmaven.test.skip=true install -f ${CMAKE_CURRENT_SOURCE_DIR}/pom.xml
|
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.17-dist.jar ${LIBRARY_OUTPUT_PATH}
|
COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/target/taos-jdbcdriver-2.0.18-dist.jar ${LIBRARY_OUTPUT_PATH}
|
||||||
COMMAND mvn -Dmaven.test.skip=true clean -f ${CMAKE_CURRENT_SOURCE_DIR}/pom.xml
|
COMMAND mvn -Dmaven.test.skip=true clean -f ${CMAKE_CURRENT_SOURCE_DIR}/pom.xml
|
||||||
COMMENT "build jdbc driver")
|
COMMENT "build jdbc driver")
|
||||||
ADD_CUSTOM_TARGET(${JDBC_TARGET_NAME} ALL WORKING_DIRECTORY ${EXECUTABLE_OUTPUT_PATH} DEPENDS ${JDBC_CMD_NAME})
|
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>
|
<groupId>com.taosdata.jdbc</groupId>
|
||||||
<artifactId>taos-jdbcdriver</artifactId>
|
<artifactId>taos-jdbcdriver</artifactId>
|
||||||
<version>2.0.17</version>
|
<version>2.0.18</version>
|
||||||
<packaging>jar</packaging>
|
<packaging>jar</packaging>
|
||||||
|
|
||||||
<name>JDBCDriver</name>
|
<name>JDBCDriver</name>
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<groupId>com.taosdata.jdbc</groupId>
|
<groupId>com.taosdata.jdbc</groupId>
|
||||||
<artifactId>taos-jdbcdriver</artifactId>
|
<artifactId>taos-jdbcdriver</artifactId>
|
||||||
<version>2.0.17</version>
|
<version>2.0.18</version>
|
||||||
<packaging>jar</packaging>
|
<packaging>jar</packaging>
|
||||||
<name>JDBCDriver</name>
|
<name>JDBCDriver</name>
|
||||||
<url>https://github.com/taosdata/TDengine/tree/master/src/connector/jdbc</url>
|
<url>https://github.com/taosdata/TDengine/tree/master/src/connector/jdbc</url>
|
||||||
|
|
|
@ -7,8 +7,8 @@ import java.sql.*;
|
||||||
|
|
||||||
public class AuthenticationTest {
|
public class AuthenticationTest {
|
||||||
|
|
||||||
// private static final String host = "127.0.0.1";
|
private static final String host = "127.0.0.1";
|
||||||
private static final String host = "master";
|
// private static final String host = "master";
|
||||||
private static final String user = "root";
|
private static final String user = "root";
|
||||||
private static final String password = "123456";
|
private static final String password = "123456";
|
||||||
private Connection conn;
|
private Connection conn;
|
||||||
|
|
|
@ -9,33 +9,33 @@ import java.util.Random;
|
||||||
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
|
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
|
||||||
public class RestfulJDBCTest {
|
public class RestfulJDBCTest {
|
||||||
|
|
||||||
// private static final String host = "127.0.0.1";
|
private static final String host = "127.0.0.1";
|
||||||
private static final String host = "master";
|
// private static final String host = "master";
|
||||||
private static Connection connection;
|
private static Connection connection;
|
||||||
private Random random = new Random(System.currentTimeMillis());
|
private Random random = new Random(System.currentTimeMillis());
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* select * from log.log
|
* select * from log.log
|
||||||
**/
|
**/
|
||||||
// @Test
|
@Test
|
||||||
// public void testCase001() {
|
public void testCase001() {
|
||||||
// try {
|
try {
|
||||||
// Statement statement = connection.createStatement();
|
Statement statement = connection.createStatement();
|
||||||
// ResultSet resultSet = statement.executeQuery("select * from log.log");
|
ResultSet resultSet = statement.executeQuery("select * from log.log");
|
||||||
// ResultSetMetaData metaData = resultSet.getMetaData();
|
ResultSetMetaData metaData = resultSet.getMetaData();
|
||||||
// while (resultSet.next()) {
|
while (resultSet.next()) {
|
||||||
// for (int i = 1; i <= metaData.getColumnCount(); i++) {
|
for (int i = 1; i <= metaData.getColumnCount(); i++) {
|
||||||
// String column = metaData.getColumnLabel(i);
|
String column = metaData.getColumnLabel(i);
|
||||||
// String value = resultSet.getString(i);
|
String value = resultSet.getString(i);
|
||||||
// System.out.print(column + ":" + value + "\t");
|
System.out.print(column + ":" + value + "\t");
|
||||||
// }
|
}
|
||||||
// System.out.println();
|
System.out.println();
|
||||||
// }
|
}
|
||||||
// statement.close();
|
statement.close();
|
||||||
// } catch (SQLException e) {
|
} catch (SQLException e) {
|
||||||
// e.printStackTrace();
|
e.printStackTrace();
|
||||||
// }
|
}
|
||||||
// }
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* create database
|
* create database
|
||||||
|
@ -118,7 +118,7 @@ public class RestfulJDBCTest {
|
||||||
for (int i = 1; i <= columnCount; i++) {
|
for (int i = 1; i <= columnCount; i++) {
|
||||||
String columnLabel = meta.getColumnLabel(i);
|
String columnLabel = meta.getColumnLabel(i);
|
||||||
String value = rs.getString(i);
|
String value = rs.getString(i);
|
||||||
System.out.print(columnLabel + ": " + value+"\t");
|
System.out.print(columnLabel + ": " + value + "\t");
|
||||||
}
|
}
|
||||||
System.out.println();
|
System.out.println();
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,8 +9,8 @@ import java.sql.*;
|
||||||
|
|
||||||
public class RestfulResultSetMetaDataTest {
|
public class RestfulResultSetMetaDataTest {
|
||||||
|
|
||||||
// private static final String host = "127.0.0.1";
|
private static final String host = "127.0.0.1";
|
||||||
private static final String host = "master";
|
// private static final String host = "master";
|
||||||
|
|
||||||
private static Connection conn;
|
private static Connection conn;
|
||||||
private static Statement stmt;
|
private static Statement stmt;
|
||||||
|
|
|
@ -12,8 +12,8 @@ import java.sql.*;
|
||||||
|
|
||||||
public class RestfulResultSetTest {
|
public class RestfulResultSetTest {
|
||||||
|
|
||||||
// private static final String host = "127.0.0.1";
|
private static final String host = "127.0.0.1";
|
||||||
private static final String host = "master";
|
// private static final String host = "master";
|
||||||
|
|
||||||
private static Connection conn;
|
private static Connection conn;
|
||||||
private static Statement stmt;
|
private static Statement stmt;
|
||||||
|
|
|
@ -11,8 +11,8 @@ import java.sql.*;
|
||||||
|
|
||||||
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
|
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
|
||||||
public class SQLTest {
|
public class SQLTest {
|
||||||
// private static final String host = "127.0.0.1";
|
private static final String host = "127.0.0.1";
|
||||||
private static final String host = "master";
|
// private static final String host = "master";
|
||||||
private static Connection connection;
|
private static Connection connection;
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
|
Loading…
Reference in New Issue