@@ -202,6 +202,87 @@ Stream<Object[]> query(@Nonnull final String query,
202202 @ Nonnull final Map <String , Object > parameters ,
203203 @ Nonnull final QueryOptions options );
204204
205+ /**
206+ * Query data from InfluxDB IOx using FlightSQL.
207+ * <p>
208+ * The result stream should be closed after use, you can use try-resource pattern to close it automatically:
209+ * <pre>
210+ * try (Stream<Map<String, Object>> rows = client.queryRows("select * from cpu where host=intel")) {
211+ * rows.forEach(row -> {
212+ * // process row
213+ * });
214+ * };
215+ * </pre>
216+ *
217+ * @param query the query string to execute, cannot be null
218+ * @return Batches of rows returned by the query
219+ */
220+ @ Nonnull
221+ Stream <Map <String , Object >> queryRows (@ Nonnull final String query );
222+
223+ /**
224+ * Query data from InfluxDB IOx using FlightSQL.
225+ * <p>
226+ * The result stream should be closed after use, you can use try-resource pattern to close it automatically:
227+ * <pre>
228+ * try (Stream<Map<String, Object>> rows = client.queryRows("select * from cpu where host=$host",
229+ * Map.of("host", "server-a"))) {
230+ * rows.forEach(row -> {
231+ * // process row
232+ * })
233+ * };
234+ * </pre>
235+ *
236+ * @param query the query string to execute, cannot be null
237+ * @param parameters query named parameters
238+ * @return Batches of rows returned by the query
239+ */
240+ @ Nonnull
241+ Stream <Map <String , Object >> queryRows (@ Nonnull final String query , @ Nonnull final Map <String , Object > parameters );
242+
243+ /**
244+ * Query data from InfluxDB IOx using FlightSQL.
245+ * <p>
246+ * The result stream should be closed after use, you can use try-resource pattern to close it automatically:
247+ * <pre>
248+ * try (Stream<Map<String, Object>> rows = client.queryRows("select * from cpu where host=intel",
249+ * options)) {
250+ * rows.forEach(row -> {
251+ * // process row
252+ * })
253+ * };
254+ * </pre>
255+ *
256+ * @param query the query string to execute, cannot be null
257+ * @param options the options for querying data from InfluxDB
258+ * @return Batches of rows returned by the query
259+ */
260+ @ Nonnull
261+ Stream <Map <String , Object >> queryRows (@ Nonnull final String query , @ Nonnull final QueryOptions options );
262+
263+ /**
264+ * Query data from InfluxDB IOx using FlightSQL.
265+ * <p>
266+ * The result stream should be closed after use, you can use try-resource pattern to close it automatically:
267+ * <pre>
268+ * try (Stream<Map<String, Object>> rows = client.queryRows("select * from cpu where host=$host",
269+ * Map.of("host", "server-a"), options)) {
270+ * rows.forEach(row -> {
271+ * // process row
272+ * })
273+ * };
274+ * </pre>
275+ *
276+ * @param query the query string to execute, cannot be null
277+ * @param parameters query named parameters
278+ * @param options the options for querying data from InfluxDB
279+ * @return Batches of rows returned by the query
280+ */
281+ @ Nonnull
282+ Stream <Map <String , Object >> queryRows (@ Nonnull final String query ,
283+ @ Nonnull final Map <String , Object > parameters ,
284+ @ Nonnull final QueryOptions options );
285+
205286 /**
206287 * Query data from InfluxDB IOx into Point structure using FlightSQL.
207288 * <p>
0 commit comments