Releases for RepoDb.Db2.BulkOperations
View the NuGet package here or download it directly here.
RepoDb.Db2.BulkOperations (v1.0.0)
Released: September 8, 2026
First general availability (non-preview) release of the Db2 Bulk Operations package, promoting the v0.0.1-beta2 preview below to stable. No functional changes since v0.0.1-beta2 — see that entry (and v0.0.1-alpha1 further below) for the full changelog and known limitations.
RepoDb.Db2.BulkOperations (v0.0.1-beta2) - Preview
Released: August 23, 2026
New
- Added Db2BulkArrayBinder, an async, array-bind based alternative to
DB2BulkCopyfor bulk inserting huge amounts of data with true asynchronous capability. It issues batchedINSERT INTO ... VALUES (:p0, :p1, ...)statements withDB2Command.ArrayBindCountset, executed via the genuinely asyncDB2Command.ExecuteNonQueryAsync(CancellationToken). - Added Db2BulkArrayBinderColumnMappingCollection, the
Db2BulkArrayBinder.ColumnMappingscollection used to define explicit source-to-destination column mappings, mirroring the shape ofDB2BulkCopyColumnMappingCollection. - Relies on TypeToDb2TypeResolver (see the RepoDb.Db2 release notes) to infer a bound parameter’s
DB2Typewhen a mapping doesn’t specify one explicitly. - Referenced the
RepoDbpackagev1.16.0-beta2. - Referenced the
RepoDb.Db2packagev0.0.1-beta2. - Referenced the
Net.IBM.Data.Db2/Net.IBM.Data.Db2-lnxpackagev9.0.0.400(v10.0.0.200on .NET 10).
RepoDb.Db2.BulkOperations (v0.0.1-alpha1) - Preview
Released: August 10, 2026
New
First release of the bulk operations extension for RepoDb.Db2, built on IBM’s Data Server .NET Provider’s DB2BulkCopy and Db2’s FINAL TABLE insert clause for identity read-back.
Verification status: this package has been implemented and reviewed; the entity-to-
DataTable/property-handler path has been spot-checked against a live Db2 LUW instance (see theGuid/CHAR(n) FOR BIT DATAnote below), but the package has not been fully exercised end-to-end. Verify the staging-table lifecycle, theFINAL TABLEidentity read-back ordering, and the multi-stepBulkMergecorrelation before relying on this package in production.
What’s included
- BulkInsert, BulkMerge, BulkUpdate, BulkDelete, and BulkDeleteByKey, each with an
Asyncoverload, callable against aDB2Connectionwith an entity list, aDataTable, or anIDataReader(BulkDeleteByKeytakes a list of primary key values instead). Db2BulkImportIdentityBehavior(KeepIdentitydefault,ReturnIdentity) - controls whether identity values are sent as-is or read back.ReturnIdentityreads the generated values back via Db2’sSELECT ... FROM FINAL TABLE (INSERT ...)clause on the same statement that loads from the staging table into the real one - no separate array-bind round trip is needed the way Oracle’sOracleBulkCopyrequires.Db2BulkImportPseudoTableType(Auto,Memory,Physical) - selects the staging-table strategy backingBulkInsert(whenReturnIdentityis used),BulkMerge,BulkUpdate,BulkDelete, andBulkDeleteByKey.Db2BulkInsertMapItem- explicit source-to-destination column mapping forBulkInsert, with an optionalDB2Typeoverride.- Entities are staged through an in-memory
DataTablerather than streamed directly through a data reader, so property handlers run before the bulk copy - confirmed live against Db2 LUW to be required for aGuid-backedCHAR(n) FOR BIT DATAcolumn, which silently breaks if streamed without going through a handler. - Referenced the
RepoDbpackagev1.16.0. - Referenced the
RepoDb.Db2packagev0.0.1-alpha. - Referenced the
Net.IBM.Data.Db2/Net.IBM.Data.Db2-lnxpackagev9.0.0.400(v10.0.0.200on .NET 10).
Known limitations (v1)
Db2BulkImportPseudoTableType.AutoandMemoryboth currently resolve toPhysicalregardless of row count - the internal auto-resolution logic returnsPhysicalon every outcome, so there is no session-private staging path implemented yet despite the enum advertising one.- Every bulk call creates its own physical staging table (
CREATE TABLE ... DEFINITION ONLY) and drops it once the call completes, rather than reusing one across calls. SinceCREATE TABLE/DROP TABLEare DDL and commonly force a commit boundary, this happens on every single call, not just the first. - The
DB2BulkCopyload into the staging table is constructed without thetransactionparameter accepted by the operation, so that portion of the write does not participate in the caller-supplied transaction - only the surrounding staging-table DDL and the finalINSERT/MERGE/UPDATE/DELETEagainst the real table do. BulkMergewithReturnIdentitydoes not use a single atomicMERGE: it snapshots matched/unmatched rows with aLEFT JOIN, issues a separateMERGE ... WHEN MATCHEDfor the updates, then a separateMERGE ... WHEN NOT MATCHED ... FINAL TABLEinsert to read back the new identities - three round trips instead of one, and the classification can go stale if another connection modifies the target table between the snapshot and the follow-up statements.BulkInsertwithReturnIdentity(andBulkMerge’s insert-only step) correlates generated identities back to source rows by sorting theFINAL TABLEresult by the new identity value ascending and assuming that order matches the source row order - the same unverified ordering assumption already called out forInsertAllon the core Db2 provider; this has not been verified against a live Db2 instance.- No
Unspecifiedidentity-behavior state —Db2BulkImportIdentityBehaviordefaults straight toKeepIdentity.