Skip to content

Commit d62cbd9

Browse files
committed
Updating README.md to reflect bulk write ability added in influxdb-rs#87
1 parent 9a7b24b commit d62cbd9

File tree

2 files changed

+25
-16
lines changed

2 files changed

+25
-16
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
/target
22
**/*.rs.bk
33
Cargo.lock
4+
.idea

README.md

+24-16
Original file line numberDiff line numberDiff line change
@@ -37,15 +37,16 @@ Pull requests are always welcome. See [Contributing](https://github.com/influxdb
3737

3838
### Currently Supported Features
3939

40-
- Reading and Writing to InfluxDB
41-
- Optional Serde Support for Deserialization
42-
- Running multiple queries in one request (e.g. `SELECT * FROM weather_berlin; SELECT * FROM weather_london`)
43-
- Authenticated and Unauthenticated Connections
44-
- `async`/`await` support
45-
- `#[derive(InfluxDbWriteable)]` Derive Macro for Writing / Reading into Structs
46-
- `GROUP BY` support
47-
- Tokio and async-std support (see example below) or [available backends](https://github.com/influxdb-rs/influxdb-rust/blob/main/influxdb/Cargo.toml)
48-
- Swappable HTTP backends ([see below](#Choice-of-HTTP-backend))
40+
- Reading and Writing to InfluxDB
41+
- Optional Serde Support for Deserialization
42+
- Running multiple queries in one request (e.g. `SELECT * FROM weather_berlin; SELECT * FROM weather_london`)
43+
- Writing single or multiple measurements in one request (e.g. `WriteQuery` or `Vec<WriteQuery>` argument)
44+
- Authenticated and Unauthenticated Connections
45+
- `async`/`await` support
46+
- `#[derive(InfluxDbWriteable)]` Derive Macro for Writing / Reading into Structs
47+
- `GROUP BY` support
48+
- Tokio and async-std support (see example below) or [available backends](https://github.com/influxdb-rs/influxdb-rust/blob/main/influxdb/Cargo.toml)
49+
- Swappable HTTP backends ([see below](#Choice-of-HTTP-backend))
4950

5051
## Quickstart
5152

@@ -76,14 +77,21 @@ async fn main() {
7677
}
7778

7879
// Let's write some data into a measurement called `weather`
79-
let weather_reading = WeatherReading {
80-
time: Timestamp::Hours(1).into(),
81-
humidity: 30,
82-
wind_direction: String::from("north"),
83-
};
84-
80+
let weather_readings = vec!(
81+
WeatherReading {
82+
time: Timestamp::Hours(1).into(),
83+
humidity: 30,
84+
wind_direction: String::from("north"),
85+
}.into_query("weather"),
86+
WeatherReading {
87+
time: Timestamp::Hours(2).into(),
88+
humidity: 40,
89+
wind_direction: String::from("west"),
90+
}.into_query("weather"),
91+
);
92+
8593
let write_result = client
86-
.query(weather_reading.into_query("weather"))
94+
.query(weather_readings)
8795
.await;
8896
assert!(write_result.is_ok(), "Write result was not okay");
8997

0 commit comments

Comments
 (0)