18 #include <boost/thread/future.hpp>
20 #include "hazelcast/util/export.h"
21 #include "hazelcast/client/connection/Connection.h"
22 #include "hazelcast/client/sql/sql_page.h"
23 #include "hazelcast/client/sql/sql_row_metadata.h"
64 class HAZELCAST_API
sql_result :
public std::enable_shared_from_this<sql_result>
71 std::shared_ptr<sql_page> first_page);
86 boost::future<std::shared_ptr<sql_page>> next();
91 bool has_next()
const;
95 std::shared_ptr<std::atomic<bool>> in_progress_;
96 std::shared_ptr<std::atomic<bool>> last_;
97 std::shared_ptr<sql_row_metadata> row_metadata_;
98 serialization::pimpl::SerializationService* serialization_;
99 std::shared_ptr<sql_result> result_;
100 std::shared_ptr<sql_page> first_page_;
112 bool row_set()
const;
129 int64_t update_count()
const;
140 boost::future<void> close();
159 spi::ClientContext* client_context_;
161 std::shared_ptr<connection::Connection> connection_;
162 impl::query_id query_id_;
163 int64_t update_count_;
164 std::shared_ptr<sql_row_metadata> row_metadata_;
165 std::shared_ptr<sql_page> first_page_;
167 bool iterator_requested_;
171 std::atomic<bool> closed_;
174 int32_t cursor_buffer_size_;
189 spi::ClientContext* client_context,
191 std::shared_ptr<connection::Connection> connection,
193 int64_t update_count,
194 std::shared_ptr<sql_row_metadata> row_metadata,
195 std::shared_ptr<sql_page> first_page,
196 int32_t cursor_buffer_size);
199 boost::future<std::shared_ptr<sql_page>> fetch_page();
202 boost::optional<T> to_object(serialization::pimpl::data data)
204 return client_context_->get_serialization_service().to_object<T>(data);
206 void check_closed()
const;
A service to execute SQL statements.