| 3064 | { |
| 3065 | public: |
| 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 | { |
nothing calls this directly
no test coverage detected