| 225 | } |
| 226 | |
| 227 | lbug_state lbug_connection_create_arrow_table(lbug_connection* connection, const char* table_name, |
| 228 | ArrowSchema* schema, ArrowArray* arrays, uint64_t num_arrays, |
| 229 | lbug_query_result* out_query_result) { |
| 230 | if (connection == nullptr || connection->_connection == nullptr || table_name == nullptr || |
| 231 | schema == nullptr || arrays == nullptr || out_query_result == nullptr) { |
| 232 | return LbugError; |
| 233 | } |
| 234 | try { |
| 235 | clearLastCAPIErrorMessage(); |
| 236 | auto result = lbug::ArrowTableSupport::createViewFromArrowTable( |
| 237 | *static_cast<Connection*>(connection->_connection), table_name, takeArrowSchema(schema), |
| 238 | takeArrowArrays(arrays, num_arrays)); |
| 239 | auto state = setQueryResult(std::move(result.queryResult), out_query_result); |
| 240 | if (state == LbugSuccess) { |
| 241 | rememberArrowTableID(static_cast<Connection*>(connection->_connection), table_name, |
| 242 | std::move(result.arrowId)); |
| 243 | } |
| 244 | return state; |
| 245 | } catch (Exception& e) { |
| 246 | setLastCAPIErrorMessage(e.what()); |
| 247 | return LbugError; |
| 248 | } |
| 249 | } |
| 250 | |
| 251 | lbug_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, |
nothing calls this directly
no test coverage detected