| 2721 | |
| 2722 | |
| 2723 | static int any_text_load(ISC_QUAD* blob_id, |
| 2724 | FB_API_HANDLE database, |
| 2725 | FB_API_HANDLE transaction, |
| 2726 | const TEXT* file_name, |
| 2727 | FB_BOOLEAN flag) |
| 2728 | { |
| 2729 | /************************************** |
| 2730 | * |
| 2731 | * a n y _ t e x t _ l o a d |
| 2732 | * |
| 2733 | ************************************** |
| 2734 | * |
| 2735 | * Functional description |
| 2736 | * Load a blob with the contents of a file. |
| 2737 | * Return TRUE is successful. |
| 2738 | * |
| 2739 | **************************************/ |
| 2740 | LocalStatus ls; |
| 2741 | CheckStatusWrapper st(&ls); |
| 2742 | RefPtr<IAttachment> att(REF_NO_INCR, handleToIAttachment(&st, &database)); |
| 2743 | if (st.getState() & Firebird::IStatus::STATE_ERRORS) |
| 2744 | return FB_FAILURE; |
| 2745 | RefPtr<ITransaction> tra(REF_NO_INCR, handleToITransaction(&st, &transaction)); |
| 2746 | if (st.getState() & Firebird::IStatus::STATE_ERRORS) |
| 2747 | return FB_FAILURE; |
| 2748 | |
| 2749 | UtilInterfacePtr()->loadBlob(&st, blob_id, att, tra, file_name, flag); |
| 2750 | |
| 2751 | if (st.getState() & Firebird::IStatus::STATE_ERRORS) |
| 2752 | { |
| 2753 | isc_print_status(st.getErrors()); |
| 2754 | return FB_FAILURE; |
| 2755 | } |
| 2756 | |
| 2757 | return FB_SUCCESS; |
| 2758 | } |
| 2759 | |
| 2760 | |
| 2761 | int API_ROUTINE BLOB_text_load(ISC_QUAD* blob_id, |
no test coverage detected