Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix/m23.0 #22592

Merged
merged 82 commits into from
Aug 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
82 commits
Select commit Hold shift + click to select a range
6bd2a32
Update cases.task
tomchon Jul 31, 2023
4dcdb54
fix: get systable cols error
wangjiaming0909 Aug 17, 2023
42b12b1
fix: document issues
dapan1121 Aug 18, 2023
8d3a164
Merge pull request #22483 from taosdata/docs/join_event
dapan1121 Aug 18, 2023
8290344
Merge pull request #22484 from taosdata/fix/liaohj
hjxilinx Aug 19, 2023
72cce08
docs: fix link in grafana doc (#22489)
danielclow Aug 19, 2023
c3e8814
docs: taos api description
kailixu Aug 20, 2023
7020ac7
docs: refine c connector docs (#22491)
sangshuduo Aug 20, 2023
7856dce
docs: taos api description
kailixu Aug 20, 2023
5516527
Merge pull request #22493 from taosdata/docs/TD-25813-m
dapan1121 Aug 21, 2023
fb80d6d
Merge pull request #22471 from taosdata/fix/m/TD-24871
dapan1121 Aug 21, 2023
aec02a5
fix: fill last group data between groups
wangjiaming0909 Aug 18, 2023
124b1e7
docs: add current_user() in function (#22496)
sangshuduo Aug 21, 2023
bb30f2c
Merge pull request #22485 from taosdata/fix/m/TS-3847
dapan1121 Aug 21, 2023
1d988aa
Merge pull request #22248 from taosdata/tomchon-patch-4
gccgdb1234 Aug 21, 2023
1d17270
update installation instruction
xiaopingcs Aug 21, 2023
28f9901
Merge pull request #22504 from taosdata/packaging/update_packaging_sc…
gccgdb1234 Aug 21, 2023
f4ef83b
release 3.1.0.2
xiaopingcs Aug 21, 2023
ac6d031
fix:do not send unsubscribe msg to taosd if subscribe failed
wangmm0220 Aug 21, 2023
c8a88fb
remove community package testing from ubuntu 16
xiaopingcs Aug 21, 2023
1644ca5
Merge pull request #22508 from taosdata/mark/tmq
hjxilinx Aug 22, 2023
ec84722
Merge pull request #22506 from taosdata/docs/main_3102
gccgdb1234 Aug 22, 2023
2054640
Update 24-show.md
gccgdb1234 Aug 22, 2023
b5bd8f7
Update 24-show.md
gccgdb1234 Aug 22, 2023
56626f2
feat(driver): add committed assignment API for jdbc
huolibo Jul 27, 2023
fe4e456
fix: global data sink manager issue
dapan1121 Aug 22, 2023
647b57d
fix: assign flags during subscribe
kailixu Aug 22, 2023
46a4dfd
fix: assign flags during subscribe
kailixu Aug 22, 2023
cb70861
fix: memory leak issue
dapan1121 Aug 22, 2023
0ec7fd7
Merge branch 'main' into packaging/update_packaging_script
xiaopingcs Aug 22, 2023
7b5fc0c
TS-3851: add tdef.h into release package
xiaopingcs Aug 22, 2023
9a19244
Merge pull request #22520 from taosdata/fix/dataSinkIssue
dapan1121 Aug 23, 2023
ec76144
Merge pull request #22521 from taosdata/fix/TS-3811-m
dapan1121 Aug 23, 2023
a601cd2
fix: alter stt_trigger bug
hzcheng Aug 23, 2023
6b61da1
reload semi session state
54liuyao Aug 23, 2023
b33bb84
Merge pull request #22527 from taosdata/fix/TD-25902
gccgdb1234 Aug 23, 2023
f45d1c6
fix: -t option and wal retention ci
DuanKuanJun Aug 23, 2023
013cf97
Merge pull request #22510 from taosdata/packaging/update_packaging_sc…
gccgdb1234 Aug 23, 2023
2aa47dd
fix: walRetention modify info
DuanKuanJun Aug 23, 2023
6877e33
fix: query have error get time is last successful
DuanKuanJun Aug 23, 2023
d5c4d38
Merge pull request #22535 from taosdata/fix/TS-3831-MAIN
gccgdb1234 Aug 23, 2023
7b9d14a
docs: add note to csharp connector docs (#22541)
sangshuduo Aug 24, 2023
04a13d1
Merge pull request #22531 from taosdata/fix/TD-25893
hjxilinx Aug 24, 2023
ed70cd1
fix: jni error log
huolibo Aug 24, 2023
7ebce28
mem leak
54liuyao Aug 24, 2023
1e108c4
mem leak
54liuyao Aug 24, 2023
3c8bd57
fix: fill operator with desc ts order returned 1 more rows
wangjiaming0909 Aug 23, 2023
d25dda4
Merge pull request #22544 from taosdata/feat/TS-3701
gccgdb1234 Aug 24, 2023
5445e83
Merge pull request #22547 from taosdata/fix/TD-25923
hjxilinx Aug 24, 2023
b142979
mem leak
54liuyao Aug 24, 2023
4c6bc4d
fix(stream): continue check wal when meeting empty delete block msg.
hjxilinx Aug 24, 2023
5344efe
fix(stream): adjust the ptr.
hjxilinx Aug 24, 2023
a72e6fd
mem leak
54liuyao Aug 24, 2023
7da464d
mem leak
54liuyao Aug 24, 2023
b83cc11
fix:[TD-25651] reset epoch if consumer changed to avoid consumeing no…
wangmm0220 Aug 24, 2023
3c68702
fix(parser): update the key words for disk io throttling.
hjxilinx Aug 24, 2023
e5049e0
undo remove operation for taosx when build taosd
xiaopingcs Aug 24, 2023
3c7ca24
Merge pull request #22532 from taosdata/fix/m/TD-25863
dapan1121 Aug 24, 2023
64959f1
fix:dot process in schemaless
wangmm0220 Aug 24, 2023
f7baadb
Merge pull request #22558 from taosdata/fix/TD-25920
hjxilinx Aug 24, 2023
d5cc415
fix:test case error
wangmm0220 Aug 24, 2023
de9b852
Merge pull request #22563 from taosdata/fix/update_db_attr
hjxilinx Aug 24, 2023
8045f30
fix:sml test case error for tbname
wangmm0220 Aug 24, 2023
6f514b2
Merge pull request #22561 from taosdata/fix/TD-25651
hjxilinx Aug 25, 2023
f7b42ad
fix: specify utf-8 in jdbc example pom.xml (#22565)
sangshuduo Aug 25, 2023
f805a49
Merge pull request #22555 from taosdata/fix/TD-25948
hjxilinx Aug 25, 2023
250a8a7
fix: taosCompressFile mem leak
shenglian-zhou Aug 25, 2023
29aaf1c
Update 06-taosdump.md dot replace with '-Q'
DuanKuanJun Aug 25, 2023
acc1203
Update 06-taosdump.md dot replace with '-Q' (English)
DuanKuanJun Aug 25, 2023
7f7ae04
Merge pull request #22574 from taosdata/DuanKuanJun-patch-8
gccgdb1234 Aug 25, 2023
4f2e1ff
Merge pull request #22573 from taosdata/DuanKuanJun-patch-7
gccgdb1234 Aug 25, 2023
e1095e7
fix: improve upgrade speed
hzcheng Aug 25, 2023
01e1bc2
Merge pull request #22571 from taosdata/fix/TD-25823
dapan1121 Aug 25, 2023
2659154
Merge pull request #22567 from taosdata/packaging/update_packaging_sc…
gccgdb1234 Aug 25, 2023
c772780
Merge pull request #22577 from taosdata/fix/TS-3865
gccgdb1234 Aug 25, 2023
1bf2c34
docs: kill query command need quote around id (#22588)
sangshuduo Aug 26, 2023
1f40da6
Merge remote-tracking branch 'origin/main' into 3.0
dapan1121 Aug 28, 2023
0cce255
Merge remote-tracking branch 'origin/3.0' into fix/m23.0
dapan1121 Aug 28, 2023
c0002e5
fix:sml error because of the config of smlDot2Underline
wangmm0220 Aug 28, 2023
f5256a4
fix:sml error because of the config of smlDot2Underline
wangmm0220 Aug 28, 2023
5213fc3
fix: fix case issue
dapan1121 Aug 28, 2023
0a17667
Merge branch 'fix/m23.0' of github.com:taosdata/TDengine into fix/m23.0
dapan1121 Aug 28, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
15 changes: 10 additions & 5 deletions docs/en/12-taos-sql/06-select.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ description: This document describes how to query data in TDengine.
## Syntax

```sql
SELECT {DATABASE() | CLIENT_VERSION() | SERVER_VERSION() | SERVER_STATUS() | NOW() | TODAY() | TIMEZONE()}
SELECT {DATABASE() | CLIENT_VERSION() | SERVER_VERSION() | SERVER_STATUS() | NOW() | TODAY() | TIMEZONE() | CURRENT_USER() | USER() }

SELECT [hints] [DISTINCT] [TAGS] select_list
from_clause
Expand Down Expand Up @@ -195,7 +195,7 @@ The following SQL statement returns the number of subtables within the meters su
SELECT COUNT(*) FROM (SELECT DISTINCT TBNAME FROM meters);
```

In the preceding two statements, only tags can be used as filtering conditions in the WHERE clause. For example:
In the preceding two statements, only tags can be used as filtering conditions in the WHERE clause.

**\_QSTART and \_QEND**

Expand Down Expand Up @@ -245,8 +245,7 @@ You can perform INNER JOIN statements based on the primary key. The following co
3. For supertables, the ON condition must be equivalent to the primary key. In addition, the tag columns of the tables on which the INNER JOIN is performed must have a one-to-one relationship. You cannot specify an OR condition.
4. The tables that are included in a JOIN clause must be of the same type (supertable, standard table, or subtable).
5. You can include subqueries before and after the JOIN keyword.
6. You cannot include more than ten tables in a JOIN clause.
7. You cannot include a FILL clause and a JOIN clause in the same statement.
6. You cannot include a FILL clause and a JOIN clause in the same statement.

## GROUP BY

Expand Down Expand Up @@ -337,6 +336,12 @@ SELECT TODAY();
SELECT TIMEZONE();
```

### Obtain Current User

```sql
SELECT CURRENT_USER();
```

## Regular Expression

### Syntax
Expand Down Expand Up @@ -391,7 +396,7 @@ SELECT AVG(CASE WHEN voltage < 200 or voltage > 250 THEN 220 ELSE voltage END) F

## JOIN

TDengine supports the `INTER JOIN` based on the timestamp primary key, that is, the `JOIN` condition must contain the timestamp primary key. As long as the requirement of timestamp-based primary key is met, `INTER JOIN` can be made between normal tables, sub-tables, super tables and sub-queries at will, and there is no limit on the number of tables.
TDengine supports the `INTER JOIN` based on the timestamp primary key, that is, the `JOIN` condition must contain the timestamp primary key. As long as the requirement of timestamp-based primary key is met, `INTER JOIN` can be made between normal tables, sub-tables, super tables and sub-queries at will, and there is no limit on the number of tables, primary key and other conditions must be combined with `AND` operator.

For standard tables:

Expand Down
8 changes: 8 additions & 0 deletions docs/en/12-taos-sql/10-function.md
Original file line number Diff line number Diff line change
Expand Up @@ -1275,6 +1275,14 @@ SELECT SERVER_STATUS();

**Description**: The server status.

### CURRENT_USER

```sql
SELECT CURRENT_USER();
```

**Description**: get current user.


## Geometry Functions

Expand Down
2 changes: 1 addition & 1 deletion docs/en/12-taos-sql/20-keywords.md
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ The following list shows all reserved keywords:

- MATCH
- MAX_DELAY
- MAX_SPEED
- BWLIMIT
- MAXROWS
- MERGE
- META
Expand Down
8 changes: 8 additions & 0 deletions docs/en/12-taos-sql/24-show.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,14 @@ SHOW CLUSTER;

Shows information about the current cluster.

## SHOW CLUSTER ALIVE

```sql
SHOW CLUSTER ALIVE;
```

It is used to check whether the cluster is available or not. Return value: 0 means unavailable, 1 means available, 2 means partially available (some dnodes are offline, the other dnodes are available)

## SHOW CONNECTIONS

```sql
Expand Down
2 changes: 1 addition & 1 deletion docs/en/12-taos-sql/28-recovery.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ You can use the SHOW CONNECTIONS statement to find the conn_id.
## Terminate a Query

```sql
KILL QUERY kill_id;
KILL QUERY 'kill_id';
```

You can use the SHOW QUERIES statement to find the kill_id.
Expand Down
41 changes: 31 additions & 10 deletions docs/en/14-reference/03-connector/03-cpp.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,12 @@ The base API is used to do things like create database connections and provide a

:::

- `TAOS *taos_connect_auth(const char *host, const char *user, const char *auth, const char *db, uint16_t port)`

The function is the same as taos_connect. Except that the pass parameter is replaced by auth, other parameters are the same as taos_connect.

- auth: the 32-bit lowercase md5 of the raw password

- `char *taos_get_server_info(TAOS *taos)`

Get server-side version information.
Expand All @@ -184,6 +190,14 @@ The base API is used to do things like create database connections and provide a
- If len is less than the space required to store the db (including the last '\0'), an error is returned. The truncated data assigned in the database ends with '\0'.
- If len is greater than or equal to the space required to store the db (including the last '\0'), return normal 0, and assign the db name ending with '\0' in the database.

- `int taos_set_notify_cb(TAOS *taos, __taos_notify_fn_t fp, void *param, int type)`

Set the event callback function.

- fp: event callback function pointer. Declaration:typedef void (*__taos_notify_fn_t)(void *param, void *ext, int type);Param is a user-defined parameter, ext is an extended parameter (depending on the event type, and returns the user password version for TAOS_NOTIFY_PASSVER), and type is the event type
- param: user-defined parameter
- type: event type. Value range: 1) TAOS_NOTIFY_PASSVER: User password changed

- `void taos_close(TAOS *taos)`

Closes the connection, where `taos` is the handle returned by `taos_connect()`.
Expand Down Expand Up @@ -307,29 +321,28 @@ The specific functions related to the interface are as follows (see also the [pr

Parse a SQL command, and bind the parsed result and parameter information to `stmt`. If the parameter length is greater than 0, use this parameter as the length of the SQL command. If it is equal to 0, the length of the SQL command will be determined automatically.

- `int taos_stmt_bind_param(TAOS_STMT *stmt, TAOS_BIND *bind)`
- `int taos_stmt_bind_param(TAOS_STMT *stmt, TAOS_MULTI_BIND *bind)`

Not as efficient as `taos_stmt_bind_param_batch()`, but can support non-INSERT type SQL statements.
To bind parameters, bind points to an array (representing the row of data to be bound), making sure that the number and order of the elements in this array are the same as the parameters in the SQL statement. taos_bind is used similarly to MYSQL_BIND in MySQL, as defined below.

```c
typedef struct TAOS_BIND {
typedef struct TAOS_MULTI_BIND {
int buffer_type;
void * buffer;
uintptr_t buffer_length; // not in use
uintptr_t * length;
int * is_null;
int is_unsigned; // not in use
int * error; // not in use
} TAOS_BIND;
void *buffer;
uintptr_t buffer_length;
uint32_t *length;
char *is_null;
int num;
} TAOS_MULTI_BIND;
```

- `int taos_stmt_set_tbname(TAOS_STMT* stmt, const char* name)`

(Available in 2.1.1.0 and later versions, only supported for replacing parameter values in INSERT statements)
When the table name in the SQL command uses `? ` placeholder, you can use this function to bind a specific table name.

- `int taos_stmt_set_tbname_tags(TAOS_STMT* stmt, const char* name, TAOS_BIND* tags)`
- `int taos_stmt_set_tbname_tags(TAOS_STMT* stmt, const char* name, TAOS_MULTI_BIND* tags)`

(Available in 2.1.2.0 and later versions, only supported for replacing parameter values in INSERT statements)
When the table name and TAGS in the SQL command both use `? `, you can use this function to bind the specific table name and the specific TAGS value. The most typical usage scenario is an INSERT statement that uses the automatic table building function (the current version does not support specifying specific TAGS columns.) The number of columns in the TAGS parameter needs to be the same as the number of TAGS requested in the SQL command.
Expand Down Expand Up @@ -358,6 +371,14 @@ The specific functions related to the interface are as follows (see also the [pr

Execute the prepared statement. Currently, a statement can only be executed once.

- `int taos_stmt_affected_rows(TAOS_STMT *stmt)`

Gets the number of rows affected by executing bind statements multiple times.

- `int taos_stmt_affected_rows_once(TAOS_STMT *stmt)`

Gets the number of rows affected by executing a bind statement once.

- `TAOS_RES* taos_stmt_use_result(TAOS_STMT *stmt)`

Gets the result set of a statement. Use the result set in the same way as in the non-parametric call. When finished, `taos_free_result()` should be called on this result set to free resources.
Expand Down
4 changes: 4 additions & 0 deletions docs/en/14-reference/03-connector/09-csharp.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ The source code of `TDengine.Connector` is hosted on [GitHub](https://github.com

The supported platforms are the same as those supported by the TDengine client driver.

:::note
Please note TDengine does not support 32bit Windows any more.
:::

## Version support

Please refer to [version support list](/reference/connector#version-support)
Expand Down
2 changes: 2 additions & 0 deletions docs/en/14-reference/06-taosdump.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,8 @@ Usage: taosdump [OPTION...] dbname [tbname ...]
-L, --loose-mode Use loose mode if the table name and column name
use letter and number only. Default is NOT.
-n, --no-escape No escape char '`'. Default is using it.
-Q, --dot-replace Repalce dot character with underline character in
the table name.
-T, --thread-num=THREAD_NUM Number of thread for dump in file. Default is
8.
-C, --cloud=CLOUD_DSN specify a DSN to access TDengine cloud service
Expand Down
2 changes: 1 addition & 1 deletion docs/en/20-third-party/01-grafana.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ grafana-cli plugins install tdengine-datasource
sudo -u grafana grafana-cli plugins install tdengine-datasource
```

You can also download zip files from [GitHub](https://github.com/taosdata/grafanaplugin/releases/tag/latest) or [Grafana](https://grafana.com/grafana/plugins/tdengine-datasource/?tab=installation) and install manually. The commands are as follows:
You can also download zip files from [GitHub](https://github.com/taosdata/grafanaplugin/releases/latest) or [Grafana](https://grafana.com/grafana/plugins/tdengine-datasource/?tab=installation) and install manually. The commands are as follows:

```bash
GF_VERSION=3.3.1
Expand Down
4 changes: 2 additions & 2 deletions docs/examples/c/multi_bind_example.c
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ void insertData(TAOS *taos) {
int code = taos_stmt_prepare(stmt, sql, 0);
checkErrorCode(stmt, code, "failed to execute taos_stmt_prepare");
// bind table name and tags
TAOS_BIND tags[2];
TAOS_MULTI_BIND tags[2];
char *location = "California.SanFrancisco";
int groupId = 2;
tags[0].buffer_type = TSDB_DATA_TYPE_BINARY;
Expand Down Expand Up @@ -144,4 +144,4 @@ int main() {
}

// output:
// successfully inserted 2 rows
// successfully inserted 2 rows
6 changes: 3 additions & 3 deletions docs/examples/c/stmt_example.c
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ void insertData(TAOS *taos) {
int code = taos_stmt_prepare(stmt, sql, 0);
checkErrorCode(stmt, code, "failed to execute taos_stmt_prepare");
// bind table name and tags
TAOS_BIND tags[2];
TAOS_MULTI_BIND tags[2];
char* location = "California.SanFrancisco";
int groupId = 2;
tags[0].buffer_type = TSDB_DATA_TYPE_BINARY;
Expand All @@ -82,7 +82,7 @@ void insertData(TAOS *taos) {
{1648432611749, 12.6, 218, 0.33},
};

TAOS_BIND values[4];
TAOS_MULTI_BIND values[4];
values[0].buffer_type = TSDB_DATA_TYPE_TIMESTAMP;
values[0].buffer_length = sizeof(int64_t);
values[0].length = &values[0].buffer_length;
Expand Down Expand Up @@ -138,4 +138,4 @@ int main() {


// output:
// successfully inserted 2 rows
// successfully inserted 2 rows
54 changes: 32 additions & 22 deletions docs/zh/08-connector/10-cpp.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,12 @@ int taos_print_row(char *str, TAOS_ROW row, TAOS_FIELD *fields, int num_fields)

:::

- `TAOS *taos_connect_auth(const char *host, const char *user, const char *auth, const char *db, uint16_t port)`

功能同 taos_connect。除 pass 参数替换为 auth 外,其他参数同 taos_connect。

- auth: 原始密码取 32 位小写 md5

- `char *taos_get_server_info(TAOS *taos)`

获取服务端版本信息。
Expand All @@ -272,6 +278,14 @@ int taos_print_row(char *str, TAOS_ROW row, TAOS_FIELD *fields, int num_fields)
- 如果,len 小于 存储db需要的空间(包含最后的'\0'),返回错误,database里赋值截断的数据,以'\0'结尾。
- 如果,len 大于等于 存储db需要的空间(包含最后的'\0'),返回正常0,database里赋值以'\0‘结尾的db名。

- `int taos_set_notify_cb(TAOS *taos, __taos_notify_fn_t fp, void *param, int type)`

设置事件回调函数。

- fp 事件回调函数指针。函数声明:typedef void (*__taos_notify_fn_t)(void *param, void *ext, int type);其中, param 为用户自定义参数,ext 为扩展参数(依赖事件类型,针对 TAOS_NOTIFY_PASSVER 返回用户密码版本),type 为事件类型
- param 用户自定义参数
- type 事件类型。取值范围:1)TAOS_NOTIFY_PASSVER: 用户密码改变

- `void taos_close(TAOS *taos)`

关闭连接,其中`taos`是 `taos_connect()` 返回的句柄。
Expand Down Expand Up @@ -396,29 +410,28 @@ TDengine 的异步 API 均采用非阻塞调用模式。应用程序可以用多

解析一条 SQL 语句,将解析结果和参数信息绑定到 stmt 上,如果参数 length 大于 0,将使用此参数作为 SQL 语句的长度,如等于 0,将自动判断 SQL 语句的长度。

- `int taos_stmt_bind_param(TAOS_STMT *stmt, TAOS_BIND *bind)`
- `int taos_stmt_bind_param(TAOS_STMT *stmt, TAOS_MULTI_BIND *bind)`

不如 `taos_stmt_bind_param_batch()` 效率高,但可以支持非 INSERT 类型的 SQL 语句。
进行参数绑定,bind 指向一个数组(代表所要绑定的一行数据),需保证此数组中的元素数量和顺序与 SQL 语句中的参数完全一致。TAOS_BIND 的使用方法与 MySQL 中的 MYSQL_BIND 类似,具体定义如下:
进行参数绑定,bind 指向一个数组(代表所要绑定的一行数据),需保证此数组中的元素数量和顺序与 SQL 语句中的参数完全一致。TAOS_MULTI_BIND 的使用方法与 MySQL 中的 MYSQL_BIND 类似,具体定义如下:

```c
typedef struct TAOS_BIND {
typedef struct TAOS_MULTI_BIND {
int buffer_type;
void * buffer;
uintptr_t buffer_length; // not in use
uintptr_t * length;
int * is_null;
int is_unsigned; // not in use
int * error; // not in use
} TAOS_BIND;
void *buffer;
uintptr_t buffer_length;
uint32_t *length;
char *is_null;
int num; // the number of columns
} TAOS_MULTI_BIND;
```

- `int taos_stmt_set_tbname(TAOS_STMT* stmt, const char* name)`

(2.1.1.0 版本新增,仅支持用于替换 INSERT 语句中的参数值)
当 SQL 语句中的表名使用了 `?` 占位时,可以使用此函数绑定一个具体的表名。

- `int taos_stmt_set_tbname_tags(TAOS_STMT* stmt, const char* name, TAOS_BIND* tags)`
- `int taos_stmt_set_tbname_tags(TAOS_STMT* stmt, const char* name, TAOS_MULTI_BIND* tags)`

(2.1.2.0 版本新增,仅支持用于替换 INSERT 语句中的参数值)
当 SQL 语句中的表名和 TAGS 都使用了 `?` 占位时,可以使用此函数绑定具体的表名和具体的 TAGS 取值。最典型的使用场景是使用了自动建表功能的 INSERT 语句(目前版本不支持指定具体的 TAGS 列)。TAGS 参数中的列数量需要与 SQL 语句中要求的 TAGS 数量完全一致。
Expand All @@ -428,17 +441,6 @@ TDengine 的异步 API 均采用非阻塞调用模式。应用程序可以用多
(2.1.1.0 版本新增,仅支持用于替换 INSERT 语句中的参数值)
以多列的方式传递待绑定的数据,需要保证这里传递的数据列的顺序、列的数量与 SQL 语句中的 VALUES 参数完全一致。TAOS_MULTI_BIND 的具体定义如下:

```c
typedef struct TAOS_MULTI_BIND {
int buffer_type;
void * buffer;
uintptr_t buffer_length;
uintptr_t * length;
char * is_null;
int num; // the number of columns
} TAOS_MULTI_BIND;
```

- `int taos_stmt_add_batch(TAOS_STMT *stmt)`

将当前绑定的参数加入批处理中,调用此函数后,可以再次调用 `taos_stmt_bind_param()` 或 `taos_stmt_bind_param_batch()` 绑定新的参数。需要注意,此函数仅支持 INSERT/IMPORT 语句,如果是 SELECT 等其他 SQL 语句,将返回错误。
Expand All @@ -447,6 +449,14 @@ TDengine 的异步 API 均采用非阻塞调用模式。应用程序可以用多

执行准备好的语句。目前,一条语句只能执行一次。

- `int taos_stmt_affected_rows(TAOS_STMT *stmt)`

获取执行多次绑定语句影响的行数。

- `int taos_stmt_affected_rows_once(TAOS_STMT *stmt)`

获取执行一次绑定语句影响的行数。

- `TAOS_RES* taos_stmt_use_result(TAOS_STMT *stmt)`

获取语句的结果集。结果集的使用方式与非参数化调用时一致,使用完成后,应对此结果集调用 `taos_free_result()` 以释放资源。
Expand Down
4 changes: 4 additions & 0 deletions docs/zh/08-connector/40-csharp.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@ import CSAsyncQuery from "../07-develop/04-query-data/_cs_async.mdx"

支持的平台和 TDengine 客户端驱动支持的平台一致。

:::note
注意 TDengine 不再支持 32 位 Windows 平台。
:::

## 版本支持

请参考[版本支持列表](../#版本支持)
Expand Down