MCPcopy Create free account
hub / github.com/FirebirdSQL/firebird / any_text_dump

Function any_text_dump

src/yvalve/utl.cpp:2507–2541  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2505
2506
2507static int any_text_dump(ISC_QUAD* blob_id,
2508 FB_API_HANDLE database,
2509 FB_API_HANDLE transaction,
2510 const SCHAR* file_name,
2511 FB_BOOLEAN txt)
2512{
2513/**************************************
2514 *
2515 * a n y _ t e x t _ d u m p
2516 *
2517 **************************************
2518 *
2519 * Functional description
2520 * Dump a blob into a file.
2521 *
2522 **************************************/
2523 LocalStatus ls;
2524 CheckStatusWrapper st(&ls);
2525 RefPtr<IAttachment> att(REF_NO_INCR, handleToIAttachment(&st, &database));
2526 if (st.getState() & Firebird::IStatus::STATE_ERRORS)
2527 return FB_FAILURE;
2528 RefPtr<ITransaction> tra(REF_NO_INCR, handleToITransaction(&st, &transaction));
2529 if (st.getState() & Firebird::IStatus::STATE_ERRORS)
2530 return FB_FAILURE;
2531
2532 UtilInterfacePtr()->dumpBlob(&st, blob_id, att, tra, file_name, txt);
2533
2534 if (st.getState() & Firebird::IStatus::STATE_ERRORS)
2535 {
2536 isc_print_status(st.getErrors());
2537 return FB_FAILURE;
2538 }
2539
2540 return FB_SUCCESS;
2541}
2542
2543
2544int API_ROUTINE BLOB_text_dump(ISC_QUAD* blob_id,

Callers 2

API_ROUTINE BLOB_dumpFunction · 0.85

Calls 6

handleToIAttachmentFunction · 0.85
handleToITransactionFunction · 0.85
UtilInterfacePtrClass · 0.85
getStateMethod · 0.45
dumpBlobMethod · 0.45
getErrorsMethod · 0.45

Tested by

no test coverage detected