MCPcopy Create free account
hub / github.com/apple/foundationdb / getUuid

Method getUuid

bindings/flow/Tuple.cpp:456–469  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

454}
455
456Uuid Tuple::getUuid(size_t index) const {
457 if (index >= offsets.size()) {
458 throw invalid_tuple_index();
459 }
460 size_t offset = offsets[index];
461 ASSERT_LT(offset, data.size());
462 uint8_t code = data[offset];
463 if (code != UUID_CODE) {
464 throw invalid_tuple_data_type();
465 }
466 ASSERT_LE(offset + Uuid::SIZE + 1, data.size());
467 StringRef uuidData(data.begin() + offset + 1, Uuid::SIZE);
468 return Uuid(uuidData);
469}
470
471Tuple Tuple::getNested(size_t index) const {
472 if (index >= offsets.size()) {

Callers 3

tupleToStringFunction · 0.80
callMethod · 0.80
callMethod · 0.80

Calls 3

UuidClass · 0.85
sizeMethod · 0.45
beginMethod · 0.45

Tested by 3

tupleToStringFunction · 0.64
callMethod · 0.64
callMethod · 0.64