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

Method addBlobStream

src/dsql/DsqlBatch.cpp:411–432  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

409}
410
411void DsqlBatch::addBlobStream(thread_db* tdbb, unsigned length, const void* inBuffer)
412{
413 // Sanity checks
414 if (length == 0)
415 return;
416 if (length % BLOB_STREAM_ALIGN)
417 {
418 ERRD_post(Arg::Gds(isc_sqlerr) << Arg::Num(-104) <<
419 Arg::Gds(isc_batch_stream_align));
420 }
421
422 blobCheckMode(true, "addBlobStream");
423 blobPrepare();
424
425 // We have no idea where is the last blob located in the stream
426 m_lastBlob = MAX_ULONG;
427
428 // store stream for further processing
429 DEB_BATCH(fprintf(stderr, "Store stream %d\n", length));
430 fb_assert(m_blobs.getSize() % BLOB_STREAM_ALIGN == 0);
431 m_blobs.put(inBuffer, length);
432}
433
434void DsqlBatch::registerBlob(thread_db*, const ISC_QUAD* existingBlob, ISC_QUAD* blobId)
435{

Callers

nothing calls this directly

Calls 5

ERRD_postFunction · 0.85
GdsClass · 0.85
NumClass · 0.85
getSizeMethod · 0.45
putMethod · 0.45

Tested by

no test coverage detected