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

Function lbug_connection_drop_arrow_table

src/c_api/connection.cpp:308–331  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

306}
307
308lbug_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
333void lbug_connection_interrupt(lbug_connection* connection) {
334 static_cast<Connection*>(connection->_connection)->interrupt();

Callers

nothing calls this directly

Calls 7

setQueryResultFunction · 0.85
forgetArrowTableIDFunction · 0.85
setLastCAPIErrorMessageFunction · 0.85
whatMethod · 0.80
emptyMethod · 0.45

Tested by

no test coverage detected