Skip to content

Commit

Permalink
Merge branch 'develop' into feat/sangshuduo/TD-14141-update-taostools
Browse files Browse the repository at this point in the history
  • Loading branch information
sangshuduo committed Sep 1, 2022
2 parents df14909 + fd0ed77 commit 0ded5b3
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 23 deletions.
11 changes: 6 additions & 5 deletions docs/zh/14-reference/03-connector/csharp.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -63,15 +63,15 @@ dotnet add package TDengine.Connector
</TabItem>
<TabItem value="source" label="使用源码获取 C# 驱动">

可以下载 TDengine 的源码,直接引用最新版本的 TDengine.Connector 库
可以[下载源码](https://github.com/taosdata/taos-connector-dotnet),直接引用 TDengine.Connector 库

```bash
git clone https://github.com/taosdata/TDengine.git
cd TDengine/src/connector/C#/src/
cp -r TDengineDriver/ myProject
git clone -b develop https://github.com/taosdata/taos-connector-dotnet
cd taos-connector-dotnet
cp -r src/ myProject

cd myProject
dotnet add TDengineDriver/TDengineDriver.csproj
dotnet add myProject.csproj reference TDengineDriver/TDengineDriver.csproj
```
</TabItem>
</Tabs>
Expand Down Expand Up @@ -159,6 +159,7 @@ namespace TDengineExample

| TDengine.Connector | 说明 |
|--------------------|--------------------------------|
| 1.0.7 | 修复TDengine.Query()内存泄露的bug。 |
| 1.0.6 | 修复 schemaless 在 1.0.4 和 1.0.5 中失效 bug。 |
| 1.0.5 | 修复 Windows 同步查询中文报错 bug。 |
| 1.0.4 | 新增异步查询,订阅等功能。修复绑定参数 bug。 |
Expand Down
4 changes: 1 addition & 3 deletions examples/nodejs/nodejsChecker.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
//const taos = require('td2.0-connector');
const taos = require('../../../src/connector/nodejs/');

const taos = require('td2.0-connector');

var host = null;
var port = 6030;
Expand Down
3 changes: 3 additions & 0 deletions tests/pytest/tools/taosdumpTest2.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ def run(self):
os.makedirs("./taosdumptest/tmp")
else:
print("directory exists")
os.system("rm -rf ./taosdumptest/tmp/*")

tdSql.prepare()

Expand All @@ -87,6 +88,7 @@ def run(self):

os.system("rm ./taosdumptest/tmp/*.sql")
os.system("rm ./taosdumptest/tmp/*.avro*")
os.system("rm -rf ./taosdumptest/taosdump.*")
os.system(
"%s --databases db -o ./taosdumptest/tmp " %
binPath)
Expand Down Expand Up @@ -122,6 +124,7 @@ def run(self):

os.system("rm ./taosdumptest/tmp/*.sql")
os.system("rm ./taosdumptest/tmp/*.avro*")
os.system("rm -rf ./taosdumptest/tmp/taosdump.*")
os.system("%s -D test -o ./taosdumptest/tmp -y" % binPath)

tdSql.execute("drop database test")
Expand Down
33 changes: 18 additions & 15 deletions tests/pytest/tools/taosdumpTest3.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ def run(self):
os.makedirs("./taosdumptest")
else:
print("directory exists")
os.system("rm -rf ./taosdumptest/*")

for i in range(1, 9):
if not os.path.exists("./taosdumptest/tmp%d" % i):
Expand All @@ -83,15 +84,15 @@ def run(self):
tdSql.execute(
"create table st0_0 using st0 tags(0) st0_1 using st0 tags (1) ")
tdSql.execute(
"insert into st0_0 values(1614218412000,8537,'R')(1614218422000,8538,'E')")
"insert into st0_0 values(1661997612000,8537,'R')(1661997622000,8538,'E')")
tdSql.execute(
"insert into st0_1 values(1614218413000,1537,'A')(1614218423000,1538,'D')")
"insert into st0_1 values(1661997613000,1537,'A')(1661997623000,1538,'D')")
tdSql.execute(
"create table if not exists gt0 (ts timestamp, c0 int, c1 float) ")
tdSql.execute(
"create table if not exists gt1 (ts timestamp, c0 int, c1 double) ")
tdSql.execute("insert into gt0 values(1614218412000,637,8.861)")
tdSql.execute("insert into gt1 values(1614218413000,638,8.862)")
tdSql.execute("insert into gt0 values(1661997602000,637,8.861)")
tdSql.execute("insert into gt1 values(1661997603000,638,8.862)")

# create db1 , three stables:stb0,include ctables stb0_0 \ stb0_1,stb1 include ctables stb1_0 and stb1_1
# \stb3,include ctables stb3_0 and stb3_1
Expand All @@ -103,35 +104,35 @@ def run(self):
tdSql.execute(
"create table st0_0 using st0 tags(0) st0_1 using st0 tags(1) ")
tdSql.execute(
"insert into st0_0 values(1614218412000,8600,'R')(1614218422000,8600,'E')")
"insert into st0_0 values(1654218412000,8600,'R')(1654218422000,8600,'E')")
tdSql.execute(
"insert into st0_1 values(1614218413000,8601,'A')(1614218423000,8601,'D')")
"insert into st0_1 values(1654218413000,8601,'A')(1654218423000,8601,'D')")
tdSql.execute(
"create stable st1(ts timestamp, c11 float, c12 nchar(10)) tags(t1 int)")
tdSql.execute(
"create table st1_0 using st1 tags(0) st1_1 using st1 tags(1) ")
tdSql.execute(
"insert into st1_0 values(1614218412000,8610.1,'R')(1614218422000,8610.1,'E')")
"insert into st1_0 values(1654218412000,8610.1,'R')(1654218422000,8610.1,'E')")
tdSql.execute(
"insert into st1_1 values(1614218413000,8611.2,'A')(1614218423000,8611.1,'D')")
"insert into st1_1 values(1654218413000,8611.2,'A')(1654218423000,8611.1,'D')")
tdSql.execute(
"create stable st2(ts timestamp, c21 float, c22 nchar(10)) tags(t1 int)")
tdSql.execute(
"create table st2_0 using st2 tags(0) st2_1 using st2 tags(1) ")
tdSql.execute(
"insert into st2_0 values(1614218412000,8620.3,'R')(1614218422000,8620.3,'E')")
"insert into st2_0 values(1654218412000,8620.3,'R')(1654218422000,8620.3,'E')")
tdSql.execute(
"insert into st2_1 values(1614218413000,8621.4,'A')(1614218423000,8621.4,'D')")
"insert into st2_1 values(1654218413000,8621.4,'A')(1654218423000,8621.4,'D')")
tdSql.execute(
"create table if not exists gt0 (ts timestamp, c00 int, c01 float) ")
tdSql.execute(
"create table if not exists gt1 (ts timestamp, c10 int, c11 double) ")
tdSql.execute(
"create table if not exists gt2 (ts timestamp, c20 int, c21 float) ")
tdSql.execute("insert into gt0 values(1614218412700,8637,78.86155)")
tdSql.execute("insert into gt0 values(1654218412700,8637,78.86155)")
tdSql.execute(
"insert into gt1 values(1614218413800,8638,78.862020199)")
tdSql.execute("insert into gt2 values(1614218413900,8639,78.863)")
"insert into gt1 values(1654218413800,8638,78.862020199)")
tdSql.execute("insert into gt2 values(1654218413900,8639,78.863)")

# create
tdSql.execute("create database if not exists dp3 precision 'ns'")
Expand All @@ -141,13 +142,15 @@ def run(self):
tdSql.execute(
"create table st0_0 using st0 tags(0) st0_1 using st0 tags(1) ")
tdSql.execute(
"insert into st0_0 values(1614218412000000001,8600,'R')(1614218422000000002,8600,'E')")
"insert into st0_0 values(1654218412000000001,8600,'R')(1654218422000000002,8600,'E')")
tdSql.execute(
"insert into st0_1 values(1614218413000000001,8601,'A')(1614218423000000002,8601,'D')")
"insert into st0_1 values(1654218413000000001,8601,'A')(1654218423000000002,8601,'D')")

# sys.exit(0)
# # taosdump stable and general table
os.system("%s -o ./taosdumptest/tmp1 -D dp1,dp2 -T 8 " % binPath)
os.system("%s -o ./taosdumptest/tmp2 dp1 st0 gt0 -T 8 " % binPath)
#sys.exit(0)
os.system(
"%s -o ./taosdumptest/tmp3 dp2 st0 st1_0 gt0 -T 8 " %
binPath)
Expand Down

0 comments on commit 0ded5b3

Please sign in to comment.