| 306 | } |
| 307 | |
| 308 | lbug_state lbug_connection_drop_arrow_table(lbug_connection* connection, const char* table_name, |
| 309 | lbug_query_result* out_query_result) { |
| 310 | if (connection == nullptr || connection->_connection == nullptr || table_name == nullptr || |
| 311 | out_query_result == nullptr) { |
| 312 | return LbugError; |
| 313 | } |
| 314 | try { |
| 315 | clearLastCAPIErrorMessage(); |
| 316 | auto connectionPtr = static_cast<Connection*>(connection->_connection); |
| 317 | auto arrowId = getRememberedArrowTableID(connectionPtr, table_name); |
| 318 | auto result = lbug::ArrowTableSupport::unregisterArrowTable(*connectionPtr, table_name); |
| 319 | auto state = setQueryResult(std::move(result), out_query_result); |
| 320 | if (state == LbugSuccess) { |
| 321 | if (!arrowId.empty()) { |
| 322 | lbug::ArrowTableSupport::unregisterArrowData(arrowId); |
| 323 | } |
| 324 | forgetArrowTableID(connectionPtr, table_name); |
| 325 | } |
| 326 | return state; |
| 327 | } catch (Exception& e) { |
| 328 | setLastCAPIErrorMessage(e.what()); |
| 329 | return LbugError; |
| 330 | } |
| 331 | } |
| 332 | |
| 333 | void lbug_connection_interrupt(lbug_connection* connection) { |
| 334 | static_cast<Connection*>(connection->_connection)->interrupt(); |
nothing calls this directly
no test coverage detected