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

Method loadBlob

src/yvalve/utl.cpp:394–425  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

392}
393
394void UtilInterface::loadBlob(CheckStatusWrapper* status, ISC_QUAD* blobId,
395 IAttachment* att, ITransaction* tra, const char* file_name, FB_BOOLEAN txt)
396{
397/**************************************
398 *
399 * l o a d B l o b
400 *
401 **************************************
402 *
403 * Functional description
404 * Load a blob with the contents of a file.
405 *
406 **************************************/
407 FILE* file = os_utils::fopen(file_name, txt ? FOPEN_READ_TYPE_TEXT : FOPEN_READ_TYPE);
408 try
409 {
410 if (!file)
411 system_error::raise("fopen");
412
413 if (!att)
414 Arg::Gds(isc_bad_db_handle).raise();
415
416 load(status, blobId, att, tra, file);
417 }
418 catch (const Exception& ex)
419 {
420 ex.stuffException(status);
421 }
422
423 if (file)
424 fclose(file);
425}
426
427void UtilInterface::getFbVersion(CheckStatusWrapper* status, IAttachment* att,
428 IVersionCallback* callback)

Callers 1

any_text_loadFunction · 0.45

Calls 7

raiseFunction · 0.85
GdsClass · 0.85
fcloseFunction · 0.85
loadFunction · 0.70
fopenFunction · 0.50
raiseMethod · 0.45
stuffExceptionMethod · 0.45

Tested by

no test coverage detected