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

Method registerBlob

src/remote/client/interface.cpp:3210–3244  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3208
3209
3210void Batch::registerBlob(CheckStatusWrapper* status, const ISC_QUAD* existingBlob, ISC_QUAD* blobId)
3211{
3212 try
3213 {
3214 // Check and validate handles, etc.
3215
3216 if (!stmt)
3217 {
3218 Arg::Gds(isc_bad_req_handle).raise();
3219 }
3220
3221 Rsr* statement = stmt->getStatement();
3222 CHECK_HANDLE(statement, isc_bad_req_handle);
3223 Rdb* rdb = statement->rsr_rdb;
3224 CHECK_HANDLE(rdb, isc_bad_db_handle);
3225 rem_port* port = rdb->rdb_port;
3226 RefMutexGuard portGuard(*port->port_sync, FB_FUNCTION);
3227
3228 if (blobPolicy == IBatch::BLOB_ID_ENGINE)
3229 genBlobId(blobId);
3230
3231 PACKET* packet = &rdb->rdb_packet;
3232 packet->p_operation = op_batch_regblob;
3233 P_BATCH_REGBLOB* batch = &packet->p_batch_regblob;
3234 batch->p_batch_statement = statement->rsr_id;
3235 batch->p_batch_exist_id = *existingBlob;
3236 batch->p_batch_blob_id = *blobId;
3237
3238 sendDeferredPacket(status, port, packet, true);
3239 }
3240 catch (const Exception& ex)
3241 {
3242 ex.stuffException(status);
3243 }
3244}
3245
3246
3247IBatchCompletionState* Batch::execute(CheckStatusWrapper* status, ITransaction* apiTra)

Callers 1

batch_regblobMethod · 0.45

Calls 5

GdsClass · 0.85
CHECK_HANDLEFunction · 0.85
raiseMethod · 0.45
getStatementMethod · 0.45
stuffExceptionMethod · 0.45

Tested by

no test coverage detected