Skip to content

Commit be410b3

Browse files
feat: add queryRows
1 parent 185e71e commit be410b3

File tree

1 file changed

+3
-4
lines changed
  • src/test/java/com/influxdb/v3/client/integration

1 file changed

+3
-4
lines changed

src/test/java/com/influxdb/v3/client/integration/E2ETest.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@ public void testQueryRows() throws Exception {
279279
}
280280

281281
@Test
282-
public void testQueryRowWithParamOptions() throws Exception {
282+
public void testQueryRowWithOptions() throws Exception {
283283
try (InfluxDBClient client = InfluxDBClient.getInstance(
284284
System.getenv("TESTING_INFLUXDB_URL"),
285285
System.getenv("TESTING_INFLUXDB_TOKEN").toCharArray(),
@@ -322,10 +322,9 @@ public void testQueryRowWithParamOptions() throws Exception {
322322
testDatas.add(map);
323323
}
324324

325-
Map<String, Object> parameters = Map.of("testId", uuid);
326325
// Result set much be ordered by time
327-
String sql = String.format("Select * from %s where \"testId\"=$testId order by time", measurement);
328-
try (Stream<Map<String, Object>> stream = client.queryRows(sql, parameters, QueryOptions.DEFAULTS)) {
326+
String sql = String.format("Select * from %s where \"testId\"='%s' order by time", measurement, uuid);
327+
try (Stream<Map<String, Object>> stream = client.queryRows(sql, QueryOptions.DEFAULTS)) {
329328
List<Map<String, Object>> results = stream.collect(Collectors.toList());
330329
for (int i = 0; i <= 9; i++) {
331330
Map<String, Object> row = results.get(i);

0 commit comments

Comments
 (0)