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

Method next

src/processor/operator/persistent/node_batch_insert.cpp:95–112  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

93 bool hasNext() const { return valuesLeft > 0; }
94
95 StoredPKValue<T> next() {
96 DASSERT(valuesLeft > 0);
97 --valuesLeft;
98 if constexpr (kIsStringPK) {
99 uint32_t len = 0;
100 readBytes(reinterpret_cast<uint8_t*>(&len), sizeof(uint32_t));
101 std::string s;
102 s.resize(len);
103 if (len > 0) {
104 readBytes(reinterpret_cast<uint8_t*>(s.data()), len);
105 }
106 return s;
107 } else {
108 StoredPKValue<T> value;
109 readBytes(reinterpret_cast<uint8_t*>(&value), sizeof(StoredPKValue<T>));
110 return value;
111 }
112 }
113
114private:
115 void readBytes(uint8_t* dst, size_t n) {

Callers 2

advanceMethod · 0.45

Calls 2

resizeMethod · 0.45
dataMethod · 0.45

Tested by

no test coverage detected