33#ifndef COUCHBASE_CXX_CLIENT_DOXYGEN
34class internal_analytics_stream_result;
199 explicit
iterator(std::shared_ptr<internal_analytics_stream_result> internal);
235 std::shared_ptr<internal_analytics_stream_result> internal_{};
236 std::pair<error, analytics_row> item_{};
237 bool terminal_{
false };
240 bool error_pending_{
false };
264 std::shared_ptr<internal_analytics_stream_result> internal_{};
Represents a single row of a streaming analytics result.
Definition analytics_row.hxx:41
A single-pass input iterator that synchronously fetches rows one at a time.
Definition analytics_stream_result.hxx:188
friend auto operator==(end_sentinel end, const iterator &it) -> bool
Definition analytics_stream_result.hxx:212
auto operator*() const -> std::pair< error, analytics_row >
friend auto operator!=(const iterator &it, end_sentinel end) -> bool
Definition analytics_stream_result.hxx:216
friend auto operator!=(end_sentinel end, const iterator &it) -> bool
Definition analytics_stream_result.hxx:220
iterator(std::shared_ptr< internal_analytics_stream_result > internal)
Constructs an iterator over an internal result; prefer begin().
auto signature() const -> std::optional< codec::binary >
Returns the analytics signature captured from the response metadata, if present.
analytics_stream_result(std::shared_ptr< internal_analytics_stream_result > internal)
Constructs an analytics stream result from an internal result.
auto next() const -> std::future< std::pair< error, std::optional< analytics_row > > >
Fetches the next row, returning a future.
auto meta_data() const -> std::future< std::pair< error, analytics_meta_data > >
Returns the analytics metadata.
analytics_stream_result()=default
Constructs an empty (no-op) result handle.
void cancel() const
Cancels the stream and closes the underlying HTTP connection.
auto begin() const -> iterator
Returns an iterator to the beginning.
void next(analytics_row_handler &&handler) const
Fetches the next row asynchronously, invoking the handler when ready.
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< analytics_row >)> analytics_row_handler
The signature for the handler of the next() operation.
Definition analytics_stream_result.hxx:43
Sentinel returned by end().
Definition analytics_stream_result.hxx:166