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

Function lbug_flat_tuple_get_value

src/c_api/flat_tuple.cpp:19–33  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

17}
18
19lbug_state lbug_flat_tuple_get_value(lbug_flat_tuple* flat_tuple, uint64_t index,
20 lbug_value* out_value) {
21 auto flat_tuple_ptr = static_cast<FlatTuple*>(flat_tuple->_flat_tuple);
22 Value* _value = nullptr;
23 try {
24 _value = flat_tuple_ptr->getValue(index);
25 } catch (Exception& e) {
26 return LbugError;
27 }
28 out_value->_value = _value;
29 // We set the ownership of the value to C++, so it will not be deleted if the value is destroyed
30 // in C.
31 out_value->_is_owned_by_cpp = true;
32 return LbugSuccess;
33}
34
35char* lbug_flat_tuple_to_string(lbug_flat_tuple* flat_tuple) {
36 auto flat_tuple_ptr = static_cast<FlatTuple*>(flat_tuple->_flat_tuple);

Callers 5

copy_flat_tupleFunction · 0.85
TEST_FFunction · 0.85
TEST_FFunction · 0.85
TEST_FFunction · 0.85
mainFunction · 0.85

Calls 1

getValueMethod · 0.45

Tested by 4

copy_flat_tupleFunction · 0.68
TEST_FFunction · 0.68
TEST_FFunction · 0.68
TEST_FFunction · 0.68