MCPcopy Create free account
hub / github.com/4paradigm/OpenMLDB / Next

Method Next

src/sdk/batch_request_result_set_sql.cc:115–138  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

113}
114
115bool SQLBatchRequestResultSet::Next() {
116 index_++;
117 if (index_ < static_cast<int32_t>(response_->count()) &&
118 position_ < byte_size_) {
119 if (non_common_schema_.empty()) {
120 return true;
121 }
122 // get row size
123 uint32_t row_size = 0;
124 cntl_->response_attachment().copy_to(&row_size, 4, position_ + 2);
125 DLOG(INFO) << "row size " << row_size << " position " << position_
126 << " byte size " << byte_size_;
127 butil::IOBuf tmp;
128 cntl_->response_attachment().append_to(&tmp, row_size, position_);
129 position_ += row_size;
130 bool ok = non_common_row_view_->Reset(tmp);
131 if (!ok) {
132 LOG(WARNING) << "reset row buf failed";
133 return false;
134 }
135 return true;
136 }
137 return false;
138}
139
140bool SQLBatchRequestResultSet::Reset() {
141 index_ = -1;

Callers

nothing calls this directly

Calls 2

emptyMethod · 0.45
ResetMethod · 0.45

Tested by

no test coverage detected