20 #if defined(WIN32) || defined(_WIN32) || defined(WIN64) || defined(_WIN64)
22 #pragma warning(disable: 4251)
35 static const int64_t SEQUENCE_UNAVAILABLE = -1;
37 read_result_set(int32_t read_count, std::vector<serialization::pimpl::data> &&data_items,
38 serialization::pimpl::SerializationService &serialization_service,
39 boost::optional<std::vector<int64_t>> &item_seqs, int64_t next_seq)
40 : items_read_count_(read_count), item_seqs_(std::move(item_seqs)), next_seq_(next_seq) {
41 for (
auto &&item : data_items) {
42 items_.emplace_back(item, serialization_service);
60 return items_read_count_;
63 const std::vector<typed_data> &get_items()
const {
76 if (index >= (int32_t) item_seqs_->size() || index < 0) {
78 "read_result_set::getSequence") <<
"Index " << index
79 <<
" is out of bounds. Sequences size is:"
80 << item_seqs_->size()).build());
83 return (*item_seqs_)[index];
112 int32_t items_read_count_;
113 std::vector<typed_data> items_;
114 boost::optional<std::vector<int64_t>> item_seqs_;
121 #if defined(WIN32) || defined(_WIN32) || defined(WIN64) || defined(_WIN64)
int64_t get_sequence(int32_t index) const
Return the sequence number for the item at the given index.
int32_t read_count() const
Returns the number of items that have been read before filtering.
int64_t get_next_sequence_to_read_from() const
Returns the sequence of the item following the last read item.