Skip to content

Commit 1ee1d20

Browse files
committed
2 parents 135b2c9 + ce87f21 commit 1ee1d20

File tree

7 files changed

+215
-217
lines changed

7 files changed

+215
-217
lines changed

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ resulting errors see [this section.](#synchronous-writes)
2626
```java
2727
InfluxDB influxDB = InfluxDBFactory.connect("http://172.17.0.2:8086", "root", "root");
2828
String dbName = "aTimeSeries";
29-
influxDB.query(new Query("CREATE DATABASE " + dbName,""));
29+
influxDB.query(new Query("CREATE DATABASE " + dbName));
3030
influxDB.setDatabase(dbName);
3131
String rpName = "aRetentionPolicy";
3232
influxDB.createRetentionPolicy(rpName, dbName, "30d", "30m", 2, true);
@@ -50,7 +50,7 @@ influxDB.write(Point.measurement("disk")
5050
Query query = new Query("SELECT idle FROM cpu", dbName);
5151
influxDB.query(query);
5252
influxDB.dropRetentionPolicy(rpName, dbName);
53-
influxDB.deleteDatabase(dbName);
53+
influxDB.query(new Query("DROP DATABASE " + dbName));
5454
influxDB.close();
5555
```
5656

@@ -86,7 +86,7 @@ If your points are written into different databases and retention policies, the
8686
```java
8787
InfluxDB influxDB = InfluxDBFactory.connect("http://172.17.0.2:8086", "root", "root");
8888
String dbName = "aTimeSeries";
89-
influxDB.query(new Query("CREATE DATABASE " + dbName,""));
89+
influxDB.query(new Query("CREATE DATABASE " + dbName));
9090
String rpName = "aRetentionPolicy";
9191
influxDB.createRetentionPolicy(rpName, dbName, "30d", "30m", 2, true);
9292

@@ -110,7 +110,7 @@ influxDB.write(dbName, rpName, point2);
110110
Query query = new Query("SELECT idle FROM cpu", dbName);
111111
influxDB.query(query);
112112
influxDB.dropRetentionPolicy(rpName, dbName);
113-
influxDB.deleteDatabase(dbName);
113+
influxDB.query(new Query("DROP DATABASE " + dbName));
114114
influxDB.close();
115115
```
116116

@@ -121,7 +121,7 @@ If you want to write the data points immediately to InfluxDB (and handle the err
121121
```java
122122
InfluxDB influxDB = InfluxDBFactory.connect("http://172.17.0.2:8086", "root", "root");
123123
String dbName = "aTimeSeries";
124-
influxDB.query(new Query("CREATE DATABASE " + dbName,""));
124+
influxDB.query(new Query("CREATE DATABASE " + dbName));
125125
String rpName = "aRetentionPolicy";
126126
influxDB.createRetentionPolicy(rpName, dbName, "30d", "30m", 2, true);
127127

@@ -148,7 +148,7 @@ influxDB.write(batchPoints);
148148
Query query = new Query("SELECT idle FROM cpu", dbName);
149149
influxDB.query(query);
150150
influxDB.dropRetentionPolicy(rpName, dbName);
151-
influxDB.deleteDatabase(dbName);
151+
influxDB.query(new Query("DROP DATABASE " + dbName));
152152
```
153153

154154
#### Try-with-resources

0 commit comments

Comments
 (0)