|
| | Batch (Statement &statement, Transaction &transaction, const BatchOptions &options={}) |
| | Creates a Batch from a prepared Statement.
|
| |
| | Batch (Attachment &attachment, Transaction &transaction, std::string_view sql, unsigned dialect=3, const BatchOptions &options={}) |
| | Creates a Batch from an Attachment and SQL text.
|
| |
| | Batch (Batch &&o) noexcept |
| | Transfers ownership of another Batch into this one.
|
| |
|
Batch & | operator= (Batch &&)=delete |
| | Move assignment is not supported.
|
| |
|
| Batch (const Batch &)=delete |
| | Copy construction is not supported.
|
| |
|
Batch & | operator= (const Batch &)=delete |
| | Copy assignment is not supported.
|
| |
| | ~Batch () noexcept |
| | Closes the batch handle if still valid.
|
| |
| bool | isValid () const noexcept |
| | Returns whether the batch handle is valid.
|
| |
|
| void | add (unsigned count, const void *inBuffer) |
| | Adds one or more raw messages to the batch buffer.
|
| |
| void | addMessage () |
| | Adds the Statement's current input-message buffer as one message.
|
| |
|
| BlobId | addBlob (std::span< const std::byte > data, const BlobOptions &bpb={}) |
| | Adds an inline blob and returns its batch-local ID.
|
| |
| void | appendBlobData (std::span< const std::byte > data) |
| | Appends more data to the last blob added with addBlob().
|
| |
| void | addBlobStream (std::span< const std::byte > data) |
| | Adds blob data in stream mode (BlobPolicy::STREAM only).
|
| |
| BlobId | registerBlob (const BlobId &existingBlob) |
| | Registers an existing blob (created via the normal Blob class) for use in the batch, and returns its batch-local ID.
|
| |
| void | setDefaultBpb (const BlobOptions &bpb) |
| | Sets the default BPB (Blob Parameter Block) for blobs in this batch.
|
| |
| unsigned | getBlobAlignment () |
| | Returns the blob alignment requirement for this batch.
|
| |
|
| BatchCompletionState | execute () |
| | Executes all queued messages and returns the completion state.
|
| |
| void | cancel () |
| | Cancels the batch, discarding all queued messages.
|
| |
| void | close () |
| | Closes the batch handle and releases resources.
|
| |
| FbRef< fb::IMessageMetadata > | getInputMetadata () |
| | Returns the input metadata for this batch.
|
| |
| const std::vector< Descriptor > & | getInputDescriptors () |
| | Returns cached input parameter descriptors for this batch.
|
| |
Wraps the Firebird IBatch interface for bulk DML operations.
A Batch collects multiple parameter sets ("messages") and sends them to the server in a single round-trip for execution. This maps directly to ODBC's "array of parameter values" feature (SQL_ATTR_PARAMSET_SIZE > 1) and is the primary performance path for ETL workloads against Firebird 4.0+.
Two creation paths are supported:
- From a prepared
Statement — uses IStatement::createBatch(). The Statement must remain valid for the lifetime of the Batch. The convenience method addMessage() copies the Statement's current input-message buffer into the batch.
- From an **
Attachment + SQL text** — uses IAttachment::createBatch(). Messages must be added via the raw add() method.
Definition at line 274 of file Batch.h.