Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
## Summary for 0.9-0.10 IoTDB Session Interface Updates
Great changes have taken place in IoTDB session of version 0.10 compared to version 0.9.
We added a large numbers of new interfaces, and some old interfaces had new names or parameters.
Besides, all exceptions thrown by session interfaces are changed from *IoTDBSessionExeception* to *IoTDBConnectionException* or *StatementExecutionExeception*.
The detailed modifications are listed as follows.
### Method name modifications
#### insert()
Insert a Record,which contains deviceId, timestamp of the record and multiple measurement values
```
void insert(String deviceId, long time, List<String> measurements, List<String> values)
```
The method name has been changed to insertRecord() in 0.10 version
```
void insertRecord(String deviceId, long time, List<String> measurements, List<String> values)
```
#### insertRowInBatch()
Insert multiple Records, which contains all the deviceIds, timestamps of the records and multiple measurement values
The method name has been changed to testInsertTablet() in 0.10 version
```
void testInsertTablet(Tablet tablet)
```
### New Interfaces
```
void open(boolean enableRPCCompression)
```
Open a session, with a parameter to specify whether to enable RPC compression.
Please pay attention that this RPC compression status of client must comply with the status of IoTDB server
```
void insertRecord(String deviceId, long time, List<String> measurements,
List<TSDataType> types, List<Object> values)
```
Insert one record, in a way that user has to provide the type information of each measurement, which is different from the original insertRecord() interface.
The values should be provided in their primitive types. This interface is more proficient than the one without type parameters.
Insert multiple records with type parameters. This interface is more proficient than the one without type parameters.
```
void insertTablet(Tablet tablet, boolean sorted)
```
An additional insertTablet() interface that providing a "sorted" parameter indicating if the tablet is in order. A sorted tablet may accelerate the insertion process.
```
void insertTablets(Map<String, Tablet> tablets)
```
A new insertTablets() for inserting multiple tablets.
Create multiple timeseries with a single method. Users can provide props, tags, attributes and measurementAlias as well for detailed timeseries information.
```
boolean checkTimeseriesExists(String path)
```
Added a method to check whether the specific timeseries exists.
Or `example/session/src/main/java/org/apache/iotdb/SessionPoolExample.java`
Or `example/session/src/main/java/org/apache/iotdb/SessionPoolExample.java`
\ No newline at end of file
## 0.9-0.10 Session Interface Updates
Great changes have taken place in IoTDB session of version 0.10 compared to version 0.9.
We added a large numbers of new interfaces, and some old interfaces had new names or parameters.
Besides, all exceptions thrown by session interfaces are changed from *IoTDBSessionExeception* to *IoTDBConnectionException* or *StatementExecutionExeception*.
The detailed modifications are listed as follows.
### Method name modifications
#### insert()
Insert a Record,which contains deviceId, timestamp of the record and multiple measurement values
```
void insert(String deviceId, long time, List<String> measurements, List<String> values)
```
The method name has been changed to insertRecord() in 0.10 version
```
void insertRecord(String deviceId, long time, List<String> measurements, List<String> values)
```
#### insertRowInBatch()
Insert multiple Records, which contains all the deviceIds, timestamps of the records and multiple measurement values
The method name has been changed to testInsertTablet() in 0.10 version
```
void testInsertTablet(Tablet tablet)
```
### New Interfaces
```
void open(boolean enableRPCCompression)
```
Open a session, with a parameter to specify whether to enable RPC compression.
Please pay attention that this RPC compression status of client must comply with the status of IoTDB server
```
void insertRecord(String deviceId, long time, List<String> measurements,
List<TSDataType> types, List<Object> values)
```
Insert one record, in a way that user has to provide the type information of each measurement, which is different from the original insertRecord() interface.
The values should be provided in their primitive types. This interface is more proficient than the one without type parameters.
Insert multiple records with type parameters. This interface is more proficient than the one without type parameters.
```
void insertTablet(Tablet tablet, boolean sorted)
```
An additional insertTablet() interface that providing a "sorted" parameter indicating if the tablet is in order. A sorted tablet may accelerate the insertion process.
```
void insertTablets(Map<String, Tablet> tablets)
```
A new insertTablets() for inserting multiple tablets.
Create multiple timeseries with a single method. Users can provide props, tags, attributes and measurementAlias as well for detailed timeseries information.
```
boolean checkTimeseriesExists(String path)
```
Added a method to check whether the specific timeseries exists.