change
This commit is contained in:
parent
f1896f54e9
commit
243d58d1fa
|
@ -5,7 +5,7 @@
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
<groupId>com.taosdata.jdbc</groupId>
|
<groupId>com.taosdata.jdbc</groupId>
|
||||||
<artifactId>jdbcChecker</artifactId>
|
<artifactId>JDBCDemo</artifactId>
|
||||||
<version>SNAPSHOT</version>
|
<version>SNAPSHOT</version>
|
||||||
<packaging>jar</packaging>
|
<packaging>jar</packaging>
|
||||||
<build>
|
<build>
|
||||||
|
@ -23,7 +23,7 @@
|
||||||
<configuration>
|
<configuration>
|
||||||
<archive>
|
<archive>
|
||||||
<manifest>
|
<manifest>
|
||||||
<mainClass>com.taosdata.example.JdbcDemo</mainClass>
|
<mainClass>com.taosdata.example.JDBCDemo</mainClass>
|
||||||
</manifest>
|
</manifest>
|
||||||
</archive>
|
</archive>
|
||||||
<descriptorRefs>
|
<descriptorRefs>
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
# How to Run the JDBC Demo Code On A Linux OS
|
# How to Run the JDBC Demo Code On Linux OS
|
||||||
TDengine's JDBC demo project is organized in a Maven way so that users can easily compile, package and run the project. If you don't have Maven on your server, you may install it using
|
TDengine's JDBC demo project is organized in a Maven way so that users can easily compile, package and run the project. If you don't have Maven on your server, you may install it using
|
||||||
<pre>sudo apt-get install maven</pre>
|
<pre>sudo apt-get install maven</pre>
|
||||||
|
|
||||||
|
@ -6,14 +6,11 @@ TDengine's JDBC demo project is organized in a Maven way so that users can easil
|
||||||
Make sure you have already installed a tdengine client on your current develop environment.
|
Make sure you have already installed a tdengine client on your current develop environment.
|
||||||
Download the tdengine package on our website: ``https://www.taosdata.com/cn/all-downloads/`` and install the client.
|
Download the tdengine package on our website: ``https://www.taosdata.com/cn/all-downloads/`` and install the client.
|
||||||
|
|
||||||
## How to run jdbcChecker
|
## Run jdbcDemo using mvn plugin
|
||||||
<pre>mvn clean compile exec:java -Dexec.mainClass="com.taosdata.example.JdbcChecker" -Dexec.args="-host localhost"</pre>
|
|
||||||
|
|
||||||
## How to run jdbcTaosDemo
|
|
||||||
run command:
|
run command:
|
||||||
<pre> mvn clean compile exec:java -Dexec.mainClass="com.taosdata.example.jdbcTaosdemo.JdbcTaosdemo"</pre>
|
<pre> mvn clean compile exec:java -Dexec.mainClass="com.taosdata.example.JdbcDemo"</pre>
|
||||||
and run with your customed args
|
and run with your customed args
|
||||||
<pre>mvn clean compile exec:java -Dexec.mainClass="com.taosdata.example.jdbcTaosdemo.JdbcTaosdemo" -Dexec.args="-host localhost"</pre>
|
<pre>mvn clean compile exec:java -Dexec.mainClass="com.taosdata.example.JdbcDemo" -Dexec.args="-host [HOSTNAME]"</pre>
|
||||||
|
|
||||||
## Compile the Demo Code and Run It
|
## Compile the Demo Code and Run It
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,7 @@ import com.taosdata.jdbc.TSDBDriver;
|
||||||
import java.sql.*;
|
import java.sql.*;
|
||||||
import java.util.Properties;
|
import java.util.Properties;
|
||||||
|
|
||||||
public class JdbcDemo {
|
public class JDBCDemo {
|
||||||
private static String host;
|
private static String host;
|
||||||
private static final String dbName = "test";
|
private static final String dbName = "test";
|
||||||
private static final String tbName = "weather";
|
private static final String tbName = "weather";
|
||||||
|
@ -22,7 +22,7 @@ public class JdbcDemo {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
JdbcDemo demo = new JdbcDemo();
|
JDBCDemo demo = new JDBCDemo();
|
||||||
demo.init();
|
demo.init();
|
||||||
demo.createDatabase();
|
demo.createDatabase();
|
||||||
demo.useDatabase();
|
demo.useDatabase();
|
Loading…
Reference in New Issue