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

Method GetBool

src/codec/flat_array.h:396–417  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

394 }
395
396 bool GetBool(bool* value) {
397 if (type_ != kBool) {
398 return false;
399 }
400 if (fsize_ == 0) {
401 return true;
402 }
403 if (offset_ + 1 > bsize_) {
404 return false;
405 }
406
407 uint8_t bool_value = 0;
408 memcpy(static_cast<void*>(&bool_value), buffer_, 1);
409 buffer_ += 1;
410 offset_ += 1;
411 if (bool_value == 1) {
412 *value = true;
413 } else {
414 *value = false;
415 }
416 return true;
417 }
418
419 bool GetInt64(int64_t* value) {
420 if (type_ != kInt64) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected