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

Method storeMetaDataBlob

src/jrd/Attachment.cpp:418–437  ·  view source on GitHub ↗

We store in CS_METADATA.

Source from the content-addressed store, hash-verified

416
417// We store in CS_METADATA.
418void Jrd::Attachment::storeMetaDataBlob(thread_db* tdbb, jrd_tra* transaction,
419 bid* blobId, const string& text, USHORT fromCharSet)
420{
421 UCharBuffer bpb;
422 if (fromCharSet != CS_METADATA)
423 BLB_gen_bpb(isc_blob_text, isc_blob_text, fromCharSet, CS_METADATA, bpb);
424
425 blb* blob = blb::create2(tdbb, transaction, blobId, bpb.getCount(), bpb.begin());
426 try
427 {
428 blob->BLB_put_data(tdbb, (const UCHAR*) text.c_str(), text.length());
429 }
430 catch (const Exception&)
431 {
432 blob->BLB_close(tdbb);
433 throw;
434 }
435
436 blob->BLB_close(tdbb);
437}
438
439
440// We store raw stuff; don't attempt to translate.

Callers

nothing calls this directly

Calls 7

BLB_gen_bpbFunction · 0.85
BLB_put_dataMethod · 0.80
BLB_closeMethod · 0.80
getCountMethod · 0.45
beginMethod · 0.45
c_strMethod · 0.45
lengthMethod · 0.45

Tested by

no test coverage detected