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

Method SetNULL

src/codec/codec.cc:196–207  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

194}
195
196bool RowBuilder::SetNULL(uint32_t index) {
197 const ::fedb::common::ColumnDesc& column = schema_.Get(index);
198 if (column.not_null()) return false;
199 int8_t* ptr = buf_ + HEADER_LENGTH + (index >> 3);
200 *(reinterpret_cast<uint8_t*>(ptr)) |= 1 << (index & 0x07);
201 if (column.data_type() == ::fedb::type::kVarchar ||
202 column.data_type() == fedb::type::kString) {
203 uint32_t str_pos = offset_vec_[index];
204 SetStrOffset(str_pos + 1);
205 }
206 return true;
207}
208
209void RowBuilder::SetStrOffset(uint32_t str_pos) {
210 if (str_pos >= str_field_cnt_) {

Callers

nothing calls this directly

Calls 1

GetMethod · 0.45

Tested by

no test coverage detected