29 this->records_ =
other.records_;
30 this->_is_empty =
other._is_empty;
31 this->_is_waitable =
other._is_waitable;
35 : _is_empty(
source.empty()),
38 bool empty()
const noexcept {
39 return this->_is_empty;
42 void push_back(
T&&
item) {
43 this->records_.push_back(std::move(
item));
44 this->_is_empty =
false;
47 void append_rows(std::vector<T>&& rows) {
52 this->records_.insert(
54 std::make_move_iterator(rows.begin()),
55 std::make_move_iterator(rows.end())
57 this->_is_empty =
false;
60 T pop_front()
noexcept {
61 T item = std::move(this->records_.front());
62 this->records_.pop_front();
64 if (this->records_.empty()) {
65 this->_is_empty =
true;
73 if (this->records_.empty()) {
77 item = this->records_.front();
87 out.push_back(std::move(this->records_.front()));
88 this->records_.pop_front();
91 if (this->records_.empty()) {
92 this->_is_empty =
true;
99 return this->_is_waitable;
106 size_t size() const noexcept {
107 return this->records_.size();
111 this->_is_waitable =
true;
115 this->_is_waitable =
false;
119 bool _is_empty =
true;
120 bool _is_waitable =
false;
121 std::deque<T> records_;
Borrow a row and error state for synchronous, single-pass field access.
Minimal row queue used when parser threading is disabled.
size_t drain_front(std::vector< T > &out, size_t max_items)
Move up to max_items rows into a caller-owned batch buffer.
bool try_copy_front(T &item) const
Copy the front item without removing it.
The all encompassing namespace.