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

Function lbug_connection_create_arrow_rel_table

src/c_api/connection.cpp:251–275  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

249}
250
251lbug_state lbug_connection_create_arrow_rel_table(lbug_connection* connection,
252 const char* table_name, const char* src_table_name, const char* dst_table_name,
253 ArrowSchema* schema, ArrowArray* arrays, uint64_t num_arrays,
254 lbug_query_result* out_query_result) {
255 if (connection == nullptr || connection->_connection == nullptr || table_name == nullptr ||
256 src_table_name == nullptr || dst_table_name == nullptr || schema == nullptr ||
257 arrays == nullptr || out_query_result == nullptr) {
258 return LbugError;
259 }
260 try {
261 clearLastCAPIErrorMessage();
262 auto result = lbug::ArrowTableSupport::createRelTableFromArrowTable(
263 *static_cast<Connection*>(connection->_connection), table_name, src_table_name,
264 dst_table_name, takeArrowSchema(schema), takeArrowArrays(arrays, num_arrays));
265 auto state = setQueryResult(std::move(result.queryResult), out_query_result);
266 if (state == LbugSuccess) {
267 rememberArrowTableID(static_cast<Connection*>(connection->_connection), table_name,
268 std::move(result.arrowId));
269 }
270 return state;
271 } catch (Exception& e) {
272 setLastCAPIErrorMessage(e.what());
273 return LbugError;
274 }
275}
276
277lbug_state lbug_connection_create_arrow_rel_table_csr(lbug_connection* connection,
278 const char* table_name, const char* src_table_name, const char* dst_table_name,

Callers

nothing calls this directly

Calls 7

takeArrowSchemaFunction · 0.85
takeArrowArraysFunction · 0.85
setQueryResultFunction · 0.85
rememberArrowTableIDFunction · 0.85
setLastCAPIErrorMessageFunction · 0.85
whatMethod · 0.80

Tested by

no test coverage detected