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

Function any_text_load

src/yvalve/utl.cpp:2723–2758  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2721
2722
2723static 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
2761int API_ROUTINE BLOB_text_load(ISC_QUAD* blob_id,

Callers 2

API_ROUTINE BLOB_loadFunction · 0.85

Calls 6

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

Tested by

no test coverage detected