Releases for RepoDb.MariaDbConnector.BulkOperations
View the NuGet package here or download it directly here.
RepoDb.MariaDbConnector.BulkOperations (v0.0.1-alpha1) - Preview
Released: TBA
New
First release of the bulk operations extension for RepoDb.MariaDbConnector (MySqlConnector-based), providing BulkInsert, BulkMerge, BulkUpdate, BulkDelete, and BulkDeleteByKey, each with an Async overload, callable against a MariaDbConnection, a table name, or a DataTable. #1271
This package started as a complete copy of RepoDb.MySqlConnector.BulkOperations. Its SQL-generation layer is shared, statement-for-statement, with RepoDb.MariaDb.BulkOperations — the two differ only in the underlying bulk-load transport: this package uses
RepoDb.Connector.MariaDbConnector’s ownMariaDbBulkCopytype directly, instead of theLOAD DATA LOCAL INFILEfile-staging approach theMySql.Data-based package needs.
Verification status: this package has been implemented and reviewed, but not yet exercised against a live MariaDB instance. Verify the bulk-load path, the identity pre-assignment/read-back, and the staging-table strategy end-to-end before relying on this package in production.
What’s included
- BulkInsert, BulkMerge, BulkUpdate, BulkDelete, and BulkDeleteByKey — matched by qualifiers or primary key; see Operations (MariaDbConnector) for the full SQL generated by each.
- MariaDbBulkImportIdentityBehavior (
KeepIdentitydefault,ReturnIdentity) — controls whether identity values are sent as-is or pre-assigned and read back via a session user variable seeded from a liveMAX(identity) + 1read. - MariaDbBulkImportPseudoTableType (
Auto,Memory,Physical) — selects the staging-table strategy backingBulkMerge/BulkUpdate/BulkDelete/BulkDeleteByKey, andBulkInsertwhenReturnIdentityis used. MariaDbBulkInsertMapItem— explicit source-to-destination column mapping forBulkInsert.- Referenced the
RepoDbpackagev1.16.0. - Referenced the
RepoDb.MariaDbConnectorpackagev0.0.1-alpha1. - Referenced the
RepoDb.Connector.MariaDbConnectorpackagev0.0.1-alpha2.
Known limitations (v1)
- MariaDbBulkImportPseudoTableType.Auto and
Memoryboth currently resolve toPhysicalregardless of row count — the internal resolution logic returnsPhysicalon every outcome, so there is no session-privateTEMPORARY TABLEstaging path exercised yet despite the enum advertising one. - Requires
AllowUserVariables=Trueon the connection string for the session-variable-based identity pre-assignment and dynamicALTER TABLEsteps. - Every bulk call creates its own physical staging table (
DROP TABLE IF EXISTS+CREATE TABLE ... AS SELECT ... WHERE (1 = 0)) and drops it once the call completes, rather than reusing one across calls. SinceCREATE TABLE/DROP TABLEare DDL, this happens on every single call, not just the first. BulkMergewithReturnIdentityis not a single atomic statement: matched rows have their identity copied from the real table first, then unmatched rows are pre-assigned a fresh one, then the real table is updated and inserted into, then a finalSELECTreads every row’s identity back — five statements in total, not one round trip.