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

Method GetString

src/codec/flat_array.h:521–537  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

519 }
520
521 bool GetString(std::string* value) {
522 if (type_ != kString && type_ != kEmptyString) {
523 return false;
524 }
525 if (fsize_ == 0) {
526 value->assign(EMPTY_STRING);
527 return true;
528 }
529 if (offset_ + fsize_ > bsize_) {
530 return false;
531 }
532 value->resize(fsize_);
533 memcpy(static_cast<void*>(&((*value)[0])), buffer_, fsize_);
534 buffer_ += fsize_;
535 offset_ += fsize_;
536 return true;
537 }
538
539 ColType GetType() { return type_; }
540

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected