Merge remote-tracking branch 'origin/3.0' into fix/TD-31540
This commit is contained in:
commit
d1e6beda5e
|
@ -66,62 +66,18 @@ In the above example code, `taos_connect()` establishes a connection to port 603
|
||||||
|
|
||||||
This section shows sample code for standard access methods to TDengine clusters using the client driver.
|
This section shows sample code for standard access methods to TDengine clusters using the client driver.
|
||||||
|
|
||||||
### Synchronous query example
|
- [Synchronous query example](https://github.com/taosdata/TDengine/tree/3.0/docs/examples/c/demo.c)
|
||||||
|
|
||||||
<details>
|
- [Asynchronous query example](https://github.com/taosdata/TDengine/tree/3.0/docs/examples/c/asyncdemo.c)
|
||||||
<summary>Synchronous query</summary>
|
|
||||||
|
|
||||||
```c
|
- [Parameter binding example](https://github.com/taosdata/TDengine/tree/3.0/docs/examples/c/prepare.c)
|
||||||
{{#include examples/c/demo.c}}
|
|
||||||
```
|
|
||||||
|
|
||||||
</details>
|
- [Schemaless writing example](https://github.com/taosdata/TDengine/tree/3.0/docs/examples/c/schemaless.c)
|
||||||
|
|
||||||
### Asynchronous query example
|
- [Subscription and consumption example](https://github.com/taosdata/TDengine/tree/3.0/docs/examples/c/tmq.c)
|
||||||
|
|
||||||
<details>
|
|
||||||
<summary>Asynchronous queries</summary>
|
|
||||||
|
|
||||||
```c
|
|
||||||
{{#include examples/c/asyncdemo.c}}
|
|
||||||
```
|
|
||||||
|
|
||||||
</details>
|
|
||||||
|
|
||||||
### Parameter binding example
|
|
||||||
|
|
||||||
<details>
|
|
||||||
<summary>Parameter Binding</summary>
|
|
||||||
|
|
||||||
```c
|
|
||||||
{{#include examples/c/prepare.c}}
|
|
||||||
```
|
|
||||||
|
|
||||||
</details>
|
|
||||||
|
|
||||||
### Pattern-free writing example
|
|
||||||
|
|
||||||
<details>
|
|
||||||
<summary>Mode free write</summary>
|
|
||||||
|
|
||||||
```c
|
|
||||||
{{#include examples/c/schemaless.c}}
|
|
||||||
```
|
|
||||||
|
|
||||||
</details>
|
|
||||||
|
|
||||||
### Subscription and consumption example
|
|
||||||
|
|
||||||
<details>
|
|
||||||
<summary>Subscribe and consume</summary>
|
|
||||||
|
|
||||||
```c
|
|
||||||
```
|
|
||||||
|
|
||||||
</details>
|
|
||||||
|
|
||||||
:::info
|
:::info
|
||||||
More example code and downloads are available at [GitHub](https://github.com/taosdata/TDengine/tree/develop/examples/c).
|
More example code and downloads are available at [GitHub](https://github.com/taosdata/TDengine/tree/develop/docs/examples/c).
|
||||||
You can find it in the installation directory under the `examples/c` path. This directory has a makefile and can be compiled under Linux/macOS by executing `make` directly.
|
You can find it in the installation directory under the `examples/c` path. This directory has a makefile and can be compiled under Linux/macOS by executing `make` directly.
|
||||||
**Hint:** When compiling in an ARM environment, please remove `-msse4.2` from the makefile. This option is only supported on the x64/x86 hardware platforms.
|
**Hint:** When compiling in an ARM environment, please remove `-msse4.2` from the makefile. This option is only supported on the x64/x86 hardware platforms.
|
||||||
|
|
||||||
|
@ -311,7 +267,7 @@ Starting with versions 2.1.1.0 and 2.1.2.0, TDengine has significantly improved
|
||||||
|
|
||||||
Note: If `taos_stmt_execute()` succeeds, you can reuse the parsed result of `taos_stmt_prepare()` to bind new data in steps 3 to 6 if you don't need to change the SQL command. However, if there is an execution error, it is not recommended to continue working in the current context but release the resources and start again with `taos_stmt_init()` steps.
|
Note: If `taos_stmt_execute()` succeeds, you can reuse the parsed result of `taos_stmt_prepare()` to bind new data in steps 3 to 6 if you don't need to change the SQL command. However, if there is an execution error, it is not recommended to continue working in the current context but release the resources and start again with `taos_stmt_init()` steps.
|
||||||
|
|
||||||
The specific functions related to the interface are as follows (see also the [prepare.c](https://github.com/taosdata/TDengine/blob/develop/examples/c/prepare.c) file for the way to use the corresponding functions)
|
The specific functions related to the interface are as follows (see also the [prepare.c](https://github.com/taosdata/TDengine/blob/develop/docs/examples/c/prepare.c) file for the way to use the corresponding functions)
|
||||||
|
|
||||||
- `TAOS_STMT* taos_stmt_init(TAOS *taos)`
|
- `TAOS_STMT* taos_stmt_init(TAOS *taos)`
|
||||||
|
|
||||||
|
|
|
@ -662,7 +662,7 @@ Example usage is as follows.
|
||||||
|
|
||||||
### More sample programs
|
### More sample programs
|
||||||
|
|
||||||
The source code of the sample application is under `TDengine/examples/JDBC`:
|
The source code of the sample application is under `TDengine/docs/examples/JDBC`:
|
||||||
|
|
||||||
- JDBCDemo: JDBC sample source code.
|
- JDBCDemo: JDBC sample source code.
|
||||||
- connectionPools: using taos-jdbcdriver in connection pools such as HikariCP, Druid, dbcp, c3p0, etc.
|
- connectionPools: using taos-jdbcdriver in connection pools such as HikariCP, Druid, dbcp, c3p0, etc.
|
||||||
|
@ -671,7 +671,7 @@ The source code of the sample application is under `TDengine/examples/JDBC`:
|
||||||
- springbootdemo: using taos-jdbcdriver in Springboot.
|
- springbootdemo: using taos-jdbcdriver in Springboot.
|
||||||
- consumer-demo: consumer TDengine data example, the consumption rate can be controlled by parameters.
|
- consumer-demo: consumer TDengine data example, the consumption rate can be controlled by parameters.
|
||||||
|
|
||||||
[JDBC example](https://github.com/taosdata/TDengine/tree/3.0/examples/JDBC)
|
[JDBC example](https://github.com/taosdata/TDengine/tree/3.0/docs/examples/JDBC)
|
||||||
|
|
||||||
## Frequently Asked Questions
|
## Frequently Asked Questions
|
||||||
|
|
||||||
|
|
|
@ -437,9 +437,9 @@ let taos = pool.get()?;
|
||||||
|
|
||||||
### More sample programs
|
### More sample programs
|
||||||
|
|
||||||
The source code of the sample application is under `TDengine/examples/rust` :
|
The source code of the sample application is under `TDengine/docs/examples/rust` :
|
||||||
|
|
||||||
[rust example](https://github.com/taosdata/TDengine/tree/3.0/examples/rust)
|
[rust example](https://github.com/taosdata/TDengine/tree/3.0/docs/examples/rust)
|
||||||
|
|
||||||
## Frequently Asked Questions
|
## Frequently Asked Questions
|
||||||
|
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue