| 2505 | |
| 2506 | |
| 2507 | static 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 | |
| 2544 | int API_ROUTINE BLOB_text_dump(ISC_QUAD* blob_id, |
no test coverage detected