Link Search Menu Expand Document

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 own MariaDbBulkCopy type directly, instead of the LOAD DATA LOCAL INFILE file-staging approach the MySql.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 (KeepIdentity default, ReturnIdentity) — controls whether identity values are sent as-is or pre-assigned and read back via a session user variable seeded from a live MAX(identity) + 1 read.
  • MariaDbBulkImportPseudoTableType (Auto, Memory, Physical) — selects the staging-table strategy backing BulkMerge/BulkUpdate/BulkDelete/BulkDeleteByKey, and BulkInsert when ReturnIdentity is used.
  • MariaDbBulkInsertMapItem — explicit source-to-destination column mapping for BulkInsert.
  • Referenced the RepoDb package v1.16.0.
  • Referenced the RepoDb.MariaDbConnector package v0.0.1-alpha1.
  • Referenced the RepoDb.Connector.MariaDbConnector package v0.0.1-alpha2.

Known limitations (v1)

  • MariaDbBulkImportPseudoTableType.Auto and Memory both currently resolve to Physical regardless of row count — the internal resolution logic returns Physical on every outcome, so there is no session-private TEMPORARY TABLE staging path exercised yet despite the enum advertising one.
  • Requires AllowUserVariables=True on the connection string for the session-variable-based identity pre-assignment and dynamic ALTER TABLE steps.
  • 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. Since CREATE TABLE/DROP TABLE are DDL, this happens on every single call, not just the first.
  • BulkMerge with ReturnIdentity is 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 final SELECT reads every row’s identity back — five statements in total, not one round trip.