Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 18 additions & 18 deletions src/UserGuide/Master/Tree/API/Programming-CSharp-Native-API.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@

# C# Native API

## Installation
## 1. Installation

### Install from NuGet Package
### 1.1 Install from NuGet Package

We have prepared Nuget Package for C# users. Users can directly install the client through .NET CLI. [The link of our NuGet Package is here](https://www.nuget.org/packages/Apache.IoTDB/). Run the following command in the command line to complete installation

Expand All @@ -33,18 +33,18 @@ dotnet add package Apache.IoTDB

Note that the `Apache.IoTDB` package only supports versions greater than `.net framework 4.6.1`.

## Prerequisites
## 2. Prerequisites

.NET SDK Version >= 5.0
.NET Framework >= 4.6.1

## How to Use the Client (Quick Start)
## 3. How to Use the Client (Quick Start)

Users can quickly get started by referring to the use cases under the Apache-IoTDB-Client-CSharp-UserCase directory. These use cases serve as a useful resource for getting familiar with the client's functionality and capabilities.

For those who wish to delve deeper into the client's usage and explore more advanced features, the samples directory contains additional code samples.

## Developer environment requirements for iotdb-client-csharp
## 4. Developer environment requirements for iotdb-client-csharp

```
.NET SDK Version >= 5.0
Expand All @@ -53,17 +53,17 @@ ApacheThrift >= 0.14.1
NLog >= 4.7.9
```

### OS
### 4.1 OS

* Linux, Macos or other unix-like OS
* Windows+bash(WSL, cygwin, Git Bash)

### Command Line Tools
### 4.2 Command Line Tools

* dotnet CLI
* Thrift

## Basic interface description
## 5. Basic interface description

The Session interface is semantically identical to other language clients

Expand Down Expand Up @@ -101,7 +101,7 @@ await session_pool.InsertTabletAsync(tablet);
await session_pool.Close();
```

## **Row Record**
## 6. **Row Record**

- Encapsulate and abstract the `record` data in **IoTDB**
- e.g.
Expand All @@ -117,7 +117,7 @@ var rowRecord =
new RowRecord(long timestamps, List<object> values, List<string> measurements);
```

### **Tablet**
### 6.1 **Tablet**

- A data structure similar to a table, containing several non empty data blocks of a device's rows。
- e.g.
Expand All @@ -137,9 +137,9 @@ var tablet =



## **API**
## 7. **API**

### **Basic API**
### 7.1 **Basic API**

| api name | parameters | notes | use example |
| -------------- | ------------------------- | ------------------------ | ----------------------------- |
Expand All @@ -151,7 +151,7 @@ var tablet =
| SetTimeZone | string | set time zone | session_pool.GetTimeZone() |
| GetTimeZone | null | get time zone | session_pool.GetTimeZone() |

### **Record API**
### 7.2 **Record API**

| api name | parameters | notes | use example |
| ----------------------------------- | ----------------------------- | ----------------------------------- | ------------------------------------------------------------ |
Expand All @@ -162,7 +162,7 @@ var tablet =
| TestInsertRecordAsync | string, RowRecord | test insert record | session_pool.TestInsertRecordAsync("root.97209_TEST_CSHARP_CLIENT_GROUP.TEST_CSHARP_CLIENT_DEVICE", rowRecord) |
| TestInsertRecordsAsync | List\<string\>, List\<RowRecord\> | test insert record | session_pool.TestInsertRecordsAsync(device_id, rowRecords) |

### **Tablet API**
### 7.3 **Tablet API**

| api name | parameters | notes | use example |
| ---------------------- | ------------ | -------------------- | -------------------------------------------- |
Expand All @@ -171,14 +171,14 @@ var tablet =
| TestInsertTabletAsync | Tablet | test insert tablet | session_pool.TestInsertTabletAsync(tablet) |
| TestInsertTabletsAsync | List\<Tablet\> | test insert tablets | session_pool.TestInsertTabletsAsync(tablets) |

### **SQL API**
### 7.4 **SQL API**

| api name | parameters | notes | use example |
| ----------------------------- | ---------- | ------------------------------ | ------------------------------------------------------------ |
| ExecuteQueryStatementAsync | string | execute sql query statement | session_pool.ExecuteQueryStatementAsync("select * from root.97209_TEST_CSHARP_CLIENT_GROUP.TEST_CSHARP_CLIENT_DEVICE where time<15"); |
| ExecuteNonQueryStatementAsync | string | execute sql nonquery statement | session_pool.ExecuteNonQueryStatementAsync( "create timeseries root.97209_TEST_CSHARP_CLIENT_GROUP.TEST_CSHARP_CLIENT_DEVICE.status with datatype=BOOLEAN,encoding=PLAIN") |

### **Scheam API**
### 7.5 **Scheam API**

| api name | parameters | notes | use example |
| -------------------------- | ------------------------------------------------------------ | --------------------------- | ------------------------------------------------------------ |
Expand All @@ -191,7 +191,7 @@ var tablet =
| DeleteTimeSeriesAsync | string | delete time series | |
| DeleteDataAsync | List\<string\>, long, long | delete data | session_pool.DeleteDataAsync(ts_path_lst, 2, 3) |

### **Other API**
### 7.6 **Other API**

| api name | parameters | notes | use example |
| -------------------------- | ---------- | --------------------------- | ---------------------------------------------------- |
Expand All @@ -201,7 +201,7 @@ var tablet =

[e.g.](https://github.com/apache/iotdb-client-csharp/tree/main/samples/Apache.IoTDB.Samples)

## SessionPool
## 8. SessionPool

To implement concurrent client requests, we provide a `SessionPool` for the native interface. Since `SessionPool` itself is a superset of `Session`, when `SessionPool` is a When the `pool_size` parameter is set to 1, it reverts to the original `Session`

Expand Down
28 changes: 14 additions & 14 deletions src/UserGuide/Master/Tree/API/Programming-Cpp-Native-API.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

# C++ Native API

## Dependencies
## 1. Dependencies

- Java 8+
- Flex
Expand All @@ -30,9 +30,9 @@
- OpenSSL 1.0+
- GCC 5.5.0+

## Installation
## 2. Installation

### Install Required Dependencies
### 2.1 Install Required Dependencies

- **MAC**
1. Install Bison:
Expand Down Expand Up @@ -89,7 +89,7 @@
- Download and install [OpenSSL](http://slproweb.com/products/Win32OpenSSL.html).
- Add the include directory under the installation directory to the PATH environment variable.

### Compilation
### 2.2 Compilation

Clone the source code from git:
```shell
Expand Down Expand Up @@ -131,7 +131,7 @@ Run Maven to compile in the IoTDB root directory:

After successful compilation, the packaged library files will be located in `iotdb-client/client-cpp/target`, and you can find the compiled example program under `example/client-cpp-example/target`.

### Compilation Q&A
### 2.3 Compilation Q&A

Q: What are the requirements for the environment on Linux?

Expand All @@ -158,11 +158,11 @@ A:
- Go back to the IoTDB code directory and run `.\mvnw.cmd clean package -pl example/client-cpp-example -am -DskipTests -P with-cpp -Dcmake.generator="Visual Studio 15 2017"`.


## Native APIs
## 3. Native APIs

Here we show the commonly used interfaces and their parameters in the Native API:

### Initialization
### 3.1 Initialization

- Open a Session
```cpp
Expand All @@ -180,7 +180,7 @@ Notice: this RPC compression status of client must comply with that of IoTDB ser
void close();
```

### Data Definition Interface (DDL)
### 3.2 Data Definition Interface (DDL)

#### Database Management

Expand Down Expand Up @@ -302,7 +302,7 @@ std::vector<std::string> showMeasurementsInTemplate(const std::string &template_
```


### Data Manipulation Interface (DML)
### 3.3 Data Manipulation Interface (DML)

#### Insert

Expand Down Expand Up @@ -384,7 +384,7 @@ void deleteData(const std::vector<std::string> &paths, int64_t endTime);
void deleteData(const std::vector<std::string> &paths, int64_t startTime, int64_t endTime);
```

### IoTDB-SQL Interface
### 3.4 IoTDB-SQL Interface

- Execute query statement
```cpp
Expand All @@ -397,7 +397,7 @@ void executeNonQueryStatement(const std::string &sql);
```


## Examples
## 4. Examples

The sample code of using these interfaces is in:

Expand All @@ -406,16 +406,16 @@ The sample code of using these interfaces is in:

If the compilation finishes successfully, the example project will be placed under `example/client-cpp-example/target`

## FAQ
## 5. FAQ

### on Mac
### 5.1 on Mac

If errors occur when compiling thrift source code, try to downgrade your xcode-commandline from 12 to 11.5

see https://stackoverflow.com/questions/63592445/ld-unsupported-tapi-file-type-tapi-tbd-in-yaml-file/65518087#65518087


### on Windows
### 5.2 on Windows

When Building Thrift and downloading packages via "wget", a possible annoying issue may occur with
error message looks like:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,15 @@

IoTDB provides powerful data subscription functionality, allowing users to access newly added data from IoTDB in real-time through subscription APIs. For detailed functional definitions and introductions:[Data subscription](../User-Manual/Data-subscription.md)

## 1 Core Steps
## 1. Core Steps

1. Create Topic: Create a Topic that includes the measurement points you wish to subscribe to.
2. Subscribe to Topic: Before a consumer subscribes to a topic, the topic must have been created, otherwise the subscription will fail. Consumers under the same consumer group will evenly distribute the data.
3. Consume Data: Only by explicitly subscribing to a specific topic will you receive data from that topic.
4. Unsubscribe: When a consumer is closed, it will exit the corresponding consumer group and cancel all existing subscriptions.


## 2 Detailed Steps
## 2. Detailed Steps

This section is used to illustrate the core development process and does not demonstrate all parameters and interfaces. For a comprehensive understanding of all features and parameters, please refer to: [Java Native API](../API/Programming-Java-Native-API.md#3-native-interface-description)

Expand Down Expand Up @@ -182,7 +182,7 @@ public class DataConsumerExample {



## 3 Java Native API Description
## 3. Java Native API Description

### 3.1 Parameter List

Expand Down
4 changes: 2 additions & 2 deletions src/UserGuide/Master/Tree/API/Programming-Go-Native-API.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

The Git repository for the Go Native API client is located [here](https://github.com/apache/iotdb-client-go/)

## Dependencies
## 1. Dependencies

* golang >= 1.13
* make >= 3.0
Expand All @@ -32,7 +32,7 @@ The Git repository for the Go Native API client is located [here](https://github
* Linux、Macos or other unix-like systems
* Windows+bash (WSL、cygwin、Git Bash)

## Installation
## 2. Installation

* go mod

Expand Down
8 changes: 4 additions & 4 deletions src/UserGuide/Master/Tree/API/Programming-JDBC.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,20 +25,20 @@
IT CAN NOT PROVIDE HIGH THROUGHPUT FOR WRITE OPERATIONS.
PLEASE USE [Java Native API](./Programming-Java-Native-API.md) INSTEAD*

## Dependencies
## 1. Dependencies

* JDK >= 1.8+
* Maven >= 3.9+

## Installation
## 2. Installation

In root directory:

```shell
mvn clean install -pl iotdb-client/jdbc -am -DskipTests
```

## Use IoTDB JDBC with Maven
## 3. Use IoTDB JDBC with Maven

```xml
<dependencies>
Expand All @@ -50,7 +50,7 @@ mvn clean install -pl iotdb-client/jdbc -am -DskipTests
</dependencies>
```

## Coding Examples
## 4. Coding Examples

This chapter provides an example of how to open a database connection, execute an SQL query, and display the results.

Expand Down
6 changes: 3 additions & 3 deletions src/UserGuide/Master/Tree/API/Programming-Java-Native-API.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,14 @@ In the native API of IoTDB, the `Session` is the core interface for interacting

`SessionPool` is a connection pool for `Session`, and it is recommended to use `SessionPool` for programming. In scenarios with multi-threaded concurrency, `SessionPool` can manage and allocate connection resources effectively, thereby improving system performance and resource utilization efficiency.

## 1 Overview of Steps
## 1. Overview of Steps

1. Create a Connection Pool Instance: Initialize a SessionPool object to manage multiple Session instances.
2. Perform Operations: Directly obtain a Session instance from the SessionPool and execute database operations, without the need to open and close connections each time.
3. Close Connection Pool Resources: When database operations are no longer needed, close the SessionPool to release all related resources.


## 2 Detailed Steps
## 2. Detailed Steps

This section provides an overview of the core development process and does not demonstrate all parameters and interfaces. For a complete list of functionalities and parameters, please refer to:[Java Native API](./Programming-Java-Native-API.md#3-native-interface-description) or check the: [Source Code](https://github.com/apache/iotdb/tree/master/example/session/src/main/java/org/apache/iotdb)

Expand Down Expand Up @@ -343,7 +343,7 @@ public class SessionPoolExample {
}
```

### 3 Native Interface Description
### 3. Native Interface Description

#### 3.1 Parameter List

Expand Down
8 changes: 4 additions & 4 deletions src/UserGuide/Master/Tree/API/Programming-Kafka.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@

[Apache Kafka](https://kafka.apache.org/) is an open-source distributed event streaming platform used by thousands of companies for high-performance data pipelines, streaming analytics, data integration, and mission-critical applications.

## Coding Example
## 1. Coding Example

### kafka Producer Producing Data Java Code Example
### 1.1 kafka Producer Producing Data Java Code Example

```java
Properties props = new Properties();
Expand All @@ -39,7 +39,7 @@
producer.close();
```

### kafka Consumer Receiving Data Java Code Example
### 1.2 kafka Consumer Receiving Data Java Code Example

```java
Properties props = new Properties();
Expand All @@ -53,7 +53,7 @@
ConsumerRecords<String, String> records = kafkaConsumer.poll(Duration.ofSeconds(1));
```

### Example of Java Code Stored in IoTDB Server
### 1.3 Example of Java Code Stored in IoTDB Server

```java
SessionPool pool =
Expand Down
Loading