cajuncoding/SqlBulkHelpers
50.6
Adequate · 21 September 2026
7.4k
lines of production code
C#
primary language
4
measurements over time
What this system is
SqlBulkHelpers is a .NET library designed for high-performance SQL Server bulk operations, including inserts, updates, and merges. It provides a modern, async-enabled API for efficient data loading and table switching via materialized data patterns. The system supports complex schema handling, identity management, and custom property transformations to optimize database interactions.
Features
Add .NET 6 and .NET Framework sample applications
Added new sample applications for both .NET 6 and .NET Framework, providing complete examples of how to use the SqlBulkHelpers library. The .NET 6 sample demonstrates the modern async/await pattern, while the .NET Framework sample includes both synchronous and asynchronous implementations to accommodate different development needs.
SqlBulkHelpers.SampleApp.Net6, SqlBulkHelpers.SampleApp.NetFramework · high confidence
Added SQL queries to retrieve detailed table schema and constraint information
The library now includes new SQL query files (Check for Non-Trusted Constraints.sql, QueryDBTableSchemaBasicDetailsJson.sql, and QueryDBTableSchemaExtendedDetailsJson.sql) that allow the library to fetch comprehensive metadata about database tables, including columns, primary keys, foreign keys, check constraints, and index details. This enables the library to better handle complex table structures, such as computed columns and non-trusted constraints, during bulk operations.
NetStandard.SqlBulkHelpers/Database/SqlQueries · high confidence
Initial release of SqlBulkHelpers library for high-performance SQL Server bulk operations
The SqlBulkHelpers library is introduced, providing a comprehensive set of classes and interfaces to facilitate high-performance bulk insert, update, and merge operations against SQL Server. The library features a default implementation that leverages a static, lazy-loaded database schema cache for optimal performance, and includes a base helper class that supports custom database schema loaders. It also provides a connection provider that defaults to loading the connection string from the application's AppSettings. The implementation utilizes temporary staging tables and SQL MERGE scripts to handle identity column updates and complex merge actions (Insert, Update, InsertOrUpdate) efficiently.
DotNetFramework.SqlBulkHelpers · high confidence
Introduce Materialized Data API for high-performance table switching
Added a new Materialized Data workflow that enables high-performance table switching by cloning live tables into temporary Loading and Discarding tables. This includes new APIs to clone table structures, copy data between tables, and execute the final switch while handling foreign key constraints and full-text indexes. The implementation introduces \MaterializeDataContext\ to manage the state, allowing users to cancel the process or disable automatic cleanup of staging tables for debugging. It also supports concurrent connections and configurable schema copy modes to minimize schema locks during the materialization process.
NetStandard.SqlBulkHelpers/MaterializedData · high confidence
Introduces dedicated connection and schema loading infrastructure for database operations
The library now provides explicit classes for managing SQL Server connections and database schema loading. A new \SqlBulkHelpersConnectionProvider\ allows users to supply either a connection string or a \Func\<SqlConnection\>\ factory, supporting both synchronous and asynchronous connection creation. A new \SqlBulkHelpersDBSchemaLoader\ handles the loading of table schema definitions, featuring lazy/deferred loading and static caching for high performance. The implementation includes support for temp tables, configurable timeouts, and cache invalidation. Additionally, a \TableNameTerm\ struct and \TableSchemaDetailLevel\ enum are introduced to standardize table name handling and schema detail levels.
NetStandard.SqlBulkHelpers/Database · high confidence
Introduces new QueryProcessing components for SQL MERGE operations
Added new classes in the QueryProcessing namespace to handle SQL MERGE logic: SqlBulkHelpersDataReader for mapping entity data to database columns, SqlBulkHelpersMergeAction and SqlBulkHelpersMergeQueryBuilder to construct and execute MERGE scripts, and SqlBulkHelpersProcessingDefinition to manage property mappings and caching. These changes enable bulk insert/update/merge operations with support for identity columns, property mapping attributes (Dapper, RepoDb, Linq2Db), and custom match qualifiers.
NetStandard.SqlBulkHelpers/SqlBulkHelper/QueryProcessing · high confidence
Introduction of Materialized Data pattern support and simplified API
The library now includes support for the Materialized Data pattern, allowing users to efficiently load offline staging tables and switch them out to replace live tables with minimal locking. This is exposed via new extension methods like \ExecuteMaterializeDataProcessAsync\ and \CloneTableStructureAsync\. The API has been simplified by removing the public instantiation of \SqlBulkHelper\<T\>\ in favor of extension methods on \SqlConnection\/\SqlTransaction\, and the \SqlBulkHelpers\ namespace has been reorganized into a dedicated class library for better code organization.
(repo-wide) · high confidence
New attributes for column mapping, table configuration, and property transformation
Users can now annotate their data models with new attributes to control SQL bulk operations. SqlBulkColumnAttribute maps properties to specific database columns, while SqlBulkTableAttribute configates the target table and schema. SqlBulkIgnoreAttribute allows properties to be excluded from bulk operations. Additionally, SqlBulkConvertToJsonAttribute enables automatic JSON serialization of properties before storage, and SqlBulkMatchQualifierAttribute provides qualifiers for matching logic.
NetStandard.SqlBulkHelpers/Attributes · high confidence
New interfaces for identity setting, connection provisioning, schema loading, and property transformation
The library introduces several new interfaces to support more flexible and performant database operations. ISqlBulkHelperIdentitySetter and ISqlBulkHelperBigIntIdentitySetter allow explicit setting of identity values for INT and BIGINT columns. ISqlBulkHelpersConnectionProvider and ISqlBulkHelpersHasTransaction provide abstractions for managing database connections and transaction contexts. ISqlBulkHelpersDBSchemaLoader exposes methods to retrieve table schema definitions with support for async operations and cache reloading. Additionally, ISqlBulkHelpersPropertyTransformer enables custom logic to transform property values before they are written to the database.
NetStandard.SqlBulkHelpers/SqlBulkHelper/Interfaces · high confidence
Behavioural changes
Introduce configurable schema copy modes and concurrent connection support for materialized data processes
The library now defaults to avoiding schema locks during materialized data operations, controlled by the new \SchemaCopyMode\ configuration (\OutsideTransactionAvoidSchemaLocks\ or \InsideTransactionAllowSchemaLocks\). This change, along with support for concurrent connections and full-text index handling, aims to minimize database blocking and improve performance. Users can now configure these behaviors via the \SqlBulkHelpersConfig\ class, which also introduces methods to clone and customize settings for individual executions.
NetStandard.SqlBulkHelpers · medium confidence
Major API overhaul and new identity insert support
The library introduces a simplified, modern API surface with full async support and a new \enableIdentityValueInsert\ parameter on \BulkInsert\, \BulkUpdate\, and \BulkInsertOrUpdate\ methods, allowing users to manually set identity values during bulk loading. The internal architecture has been refactored into new classes like \BaseSqlBulkHelper\ and \SqlBulkCopyFactory\, and the legacy v1 instantiation pattern is now deprecated in favor of the new extension methods. Additionally, the library now supports dynamic property conversion via the \ISqlBulkHelpersPropertyConverter\ interface and \SqlBulkLambdaPropertyConverter\ for custom data transformations before writing to the database.
NetStandard.SqlBulkHelpers/SqlBulkHelper · high confidence
Refactored internal helper classes and added new utility extensions
The library has been refactored to improve code organization, readability, and performance. New internal extension classes have been added to the CustomExtensions namespace, including EmbeddedResourceExtensions for loading embedded resources, ReflectionExtensions for attribute lookup, RepoDbDynamicCustomExtensions for handling RepoDb property handlers, and various string, collection, and IO extensions. A new TokenIdGenerator utility has also been introduced to generate unique short IDs. These changes streamline the internal API and reduce memory footprint by eliminating duplicate caching.
NetStandard.SqlBulkHelpers/CustomExtensions · high confidence
Fixes
Fixes for property mapping and null reference errors in bulk operations
Resolves a null reference exception that occurred when using the Linq2Db Column name mapping attribute without specifying a name, and corrects processing of model properties mapped to database columns via attributes like \[SqlBulkColumn\], \[Map\], and \[Column\]. Additionally, introduces a new RepoDb property handler to support JSON serialization for complex types during bulk inserts.
SqlBulkHelpers.SampleApp.Common · medium confidence
Test coverage
Added SQL scripts for test database initialization; Added integration tests for bulk insert, update, and connection handling; Added integration tests for schema loading and caching; Added integration tests for table materialization, cloning, and identity management; Added test helper utilities for connection management and retry logic; Added test infrastructure for SqlBulkHelpers.
Dependencies
Updated project dependencies and target frameworks
The library and sample applications have been updated to target .NET Standard 2.0 and 2.1, with the test suite migrated to .NET 8.0. Key dependency updates include upgrading Microsoft.Data.SqlClient to version 6.1.4, Newtonsoft.Json to 13.0.4, and Fasterflect to 3.0.0. The test project now uses MSTest 4.0.2 and Microsoft.NET.Test.Sdk 18.0.1.
(dependencies) · high confidence
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
How this codebase got here
This is the PUBLIC form of this artifact. Findings are listed in full, but the details of SECURITY findings — which rule fired, in which file, on which line, and how to fix it — are deliberately withheld, and any secret-scanner results are excluded entirely. Where detail is absent here it was REMOVED FOR PUBLICATION; it is not missing from the analysis. The complete artifact is available from the repository owner.
Score
- CAI 53 → 51 (-2.4)
- Rubric changed (rubric-2026.08.19 → rubric-2026.09.15) — scores are not directly comparable.
Lenses
- Code Health 59 → 57 (-2.0)
- Architecture 97 → 97 (-0.1)
- Maturity 50 → 47 (-3.6)
- Readiness 48 → 46 (-2.3)
- Security 57 → 56 (-1.3)
Resolved (15)
- Bounded contexts not declared
- Build did not complete in the analyzer
- High: security finding (details withheld)
- High: security finding (details withheld)
- High: security finding (details withheld)
- High: security finding (details withheld)
- High: security finding (details withheld)
- High: security finding (details withheld)
- High: security finding (details withheld)
- High: security finding (details withheld)
- High: security finding (details withheld)
- High: security finding (details withheld)
- No exposed public API
- Off-boarding risk: anonymized user #1
- redundant comment (DotNetFramework.SqlBulkHelpers/SqlBulkHelpers/QueryProcessing/SqlBulkHelpersMergeQueryBuilder.cs)
New (35)
- Build failed
- CommentedOutCode (SqlBulkHelpers.Tests/IntegrationTests/SqlBulkLoadingTests/BulkInsertOrUpdateTests.cs)
- CommentedOutCode (SqlBulkHelpers.Tests/IntegrationTests/SqlBulkLoadingTests/BulkInsertTests.cs)
- CommentedOutCode (SqlBulkHelpers.Tests/IntegrationTests/SqlBulkLoadingTests/ConnectionAndConstructorTests.cs)
- Dead code: SqlBulkHelpersConnectionProxyExistingProvider (NetStandard.SqlBulkHelpers/Database/SqlBulkHelpersConnectionProxyExistingProvider.cs)
- Documentation: no installation or build instructions (README.md)
- Documentation: no usage examples (README.md)
- Duplicated block (14 lines × 2) (SqlBulkHelpers.SampleApp.Net6/Program.cs)
- Duplicated block (21 lines × 2) (NetStandard.SqlBulkHelpers/MaterializedData/MaterializeDataHelper.cs)
- Duplicated block (25 lines × 2) (NetStandard.SqlBulkHelpers/SqlBulkHelper/SqlBulkHelper.Processing.cs)
- End-of-life runtime: .NET net6.0
- High: security finding (details withheld)
- High: security finding (details withheld)
- High: security finding (details withheld)
- High: security finding (details withheld)
- High: security finding (details withheld)
- High: security finding (details withheld)
- High: security finding (details withheld)
- High: security finding (details withheld)
- High: security finding (details withheld)
- …and 15 more
Architecture
- Unchanged — 3 containers · 0 contexts · 0 edges
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
Survey your own repository
cajuncoding/SqlBulkHelpers was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.
About this page
- The score is its most recent published measurement, taken on 21 September 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
- Measured at commit 1ba9e5d29115945ed63491ef4d532adc064ec1b0 — the exact code this score is about.
- Scored under rubric-2026.09.15 — the same rubric and the same method as every other entry in this index.
- Measured by watchdog.canine.dev using codehealth-analyzer preprod-28e75b8e3254.