MCPcopy Create free account
hub / github.com/LadybugDB/ladybug / reserveString

Method reserveString

src/common/vector/value_vector.cpp:528–536  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

526}
527
528void StringVector::reserveString(ValueVector* vector, string_t& dstStr, uint64_t length) {
529 DASSERT(vector->dataType.getPhysicalType() == PhysicalTypeID::STRING ||
530 vector->dataType.getPhysicalType() == PhysicalTypeID::JSON);
531 auto stringBuffer = dynamic_cast_checked<StringAuxiliaryBuffer*>(vector->auxiliaryBuffer.get());
532 dstStr.len = length;
533 if (!string_t::isShortString(length)) {
534 dstStr.overflowPtr = reinterpret_cast<uint64_t>(stringBuffer->allocateOverflow(length));
535 }
536}
537
538void StringVector::addString(ValueVector* vector, string_t& dstStr, string_t& srcStr) {
539 DASSERT(vector->dataType.getPhysicalType() == PhysicalTypeID::STRING ||

Callers

nothing calls this directly

Calls 4

isShortStringFunction · 0.85
allocateOverflowMethod · 0.80
getPhysicalTypeMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected