33#ifndef COUCHBASE_CXX_CLIENT_DOXYGEN
34class internal_query_stream_result;
235 explicit
iterator(std::shared_ptr<internal_query_stream_result> internal);
271 std::shared_ptr<internal_query_stream_result> internal_{};
272 std::pair<error, query_row> item_{};
273 bool terminal_{
false };
276 bool error_pending_{
false };
300 std::shared_ptr<internal_query_stream_result> internal_{};
Represents a single row of a streaming query result.
Definition query_row.hxx:41
A single-pass input iterator that synchronously fetches rows one at a time.
Definition query_stream_result.hxx:224
friend auto operator==(end_sentinel end, const iterator &it) -> bool
Definition query_stream_result.hxx:248
friend auto operator!=(const iterator &it, end_sentinel end) -> bool
Definition query_stream_result.hxx:252
friend auto operator!=(end_sentinel end, const iterator &it) -> bool
Definition query_stream_result.hxx:256
auto operator*() const -> std::pair< error, query_row >
iterator(std::shared_ptr< internal_query_stream_result > internal)
Constructs an iterator over an internal result; prefer begin().
auto meta_data() const -> std::future< std::pair< error, query_meta_data > >
Returns the query metadata.
auto signature() const -> std::optional< codec::binary >
Returns the query signature captured from the response metadata, if present.
auto next() const -> std::future< std::pair< error, std::optional< query_row > > >
Fetches the next row, returning a future.
void next(query_row_handler &&handler) const
Fetches the next row asynchronously, invoking the handler when ready.
query_stream_result(std::shared_ptr< internal_query_stream_result > internal)
Constructs a query stream result from an internal result.
void cancel() const
Cancels the stream and closes the underlying HTTP connection.
auto begin() const -> iterator
Returns an iterator to the beginning.
query_stream_result()=default
Constructs an empty (no-op) result handle.
auto end() const -> end_sentinel
Returns the end sentinel.
Definition analytics_options.hxx:36
Represents a single item from the result of scan().
Definition allow_querying_search_index_options.hxx:28
std::function< void(error, std::optional< query_row >)> query_row_handler
The signature for the handler of the next() operation.
Definition query_stream_result.hxx:43
Sentinel returned by end().
Definition query_stream_result.hxx:195