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

Method Encode

src/codec/flat_array.h:264–272  ·  view source on GitHub ↗

encode data to buffer

Source from the content-addressed store, hash-verified

262
263 // encode data to buffer
264 void Encode(const ColType& type, const void* data, uint16_t size) {
265 Column& col = datas_[cur_cnt_];
266 col.type = type;
267 if (size != 0) {
268 col.buffer.resize(size);
269 char* buffer = reinterpret_cast<char*>(&(col.buffer[0]));
270 memcpy(buffer, data, size);
271 }
272 }
273
274 private:
275 std::string* buffer_;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected