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

Method DataPipe

src/jrd/SysFunction.cpp:3066–3099  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3064{
3065public:
3066 DataPipe(thread_db* t, const dsc* desc, impure_value* i)
3067 : tdbb(t),
3068 impure(i),
3069 blobMode(desc->isBlob()),
3070 completed(false),
3071 ptr(nullptr),
3072 len(0),
3073 blob(nullptr),
3074 newBlob(nullptr)
3075 {
3076 if (!blobMode)
3077 ptr = CVT_get_bytes(desc, len);
3078 else
3079 {
3080 blobDesc.makeBlob(0, ttype_none);
3081 blobDesc.dsc_address = (UCHAR*) &impure->vlu_misc.vlu_bid;
3082
3083 try
3084 {
3085 const UCHAR streamBpb[] = {isc_bpb_version1, isc_bpb_type, 1, isc_bpb_type_stream};
3086 newBlob = blb::create2(tdbb, tdbb->getRequest()->req_transaction, &impure->vlu_misc.vlu_bid,
3087 sizeof(streamBpb), streamBpb);
3088 blob = blb::open2(tdbb, tdbb->getRequest()->req_transaction, reinterpret_cast<bid*>(desc->dsc_address),
3089 sizeof(streamBpb), streamBpb);
3090
3091 ptr = inBuf.getBuffer(BLOB_STEP);
3092 len = blob->BLB_get_data(tdbb, inBuf.begin(), inBuf.getCount(), false);
3093 }
3094 catch (...)
3095 {
3096 closeBlobs();
3097 }
3098 }
3099 }
3100
3101 ~DataPipe()
3102 {

Callers

nothing calls this directly

Calls 8

CVT_get_bytesFunction · 0.85
isBlobMethod · 0.80
makeBlobMethod · 0.80
BLB_get_dataMethod · 0.80
getRequestMethod · 0.45
getBufferMethod · 0.45
beginMethod · 0.45
getCountMethod · 0.45

Tested by

no test coverage detected