Skip to content

DataLinq v0.6.5 - LINQ Enhancements & Multi-Targeting

Choose a tag to compare

@bazer bazer released this 15 Dec 21:24
· 242 commits to master since this release

This release expands framework support to include .NET 8, 9, and 10, introduces significant improvements to the LINQ query parser for string manipulation and collection handling, and includes internal optimizations for newer .NET runtimes.

Highlights

  • Multi-Targeting Support: DataLinq now explicitly targets .NET 8.0, .NET 9.0, and .NET 10.0.
  • Performance Optimization on .NET 9+: Implemented conditional compilation to utilize the new System.Threading.Lock on .NET 9 and greater, improving thread synchronization performance in ImmutableRelation and ImmutableForeignKey.
  • Advanced LINQ Chains: Added support for chained string functions in queries. You can now write LINQ expressions like x.Name.Trim().Length, and they will correctly translate to the corresponding SQL.

LINQ & Query Engine

  • Chained String Functions: The QueryBuilder now supports parsing and generating SQL for chained string operations (e.g., Trim().ToUpper().Length).
  • Enhanced Collection Handling: Improved translation logic for Contains and Any methods.
    • Added robust handling for empty lists in Contains queries (resolving to 1=0 or 1=1).
    • Fixed handling of negated Contains conditions.
    • Added support for op_Implicit calls wrapping arrays or spans within queries.
  • Entity Selection: Improved QueryExecutor to handle selecting the full entity directly in projections (e.g., source.Select(x => x)).
  • Expression Evaluation: Updated the Evaluator to safely handle non-reducible expressions (like QuerySourceReferenceExpression), preventing runtime errors during partial evaluation of query trees.

Bug Fixes & Internal Improvements

  • Dependency Update: Updated ThrowAway package to version 0.3.1 and updated various test dependencies (Bogus, xUnit, etc.).
  • SQL Generation: Added argument validation for Substring functions in SQL providers to ensure correct usage.
  • Test Suite Reliability: Adjusted transaction tests to correctly account for isolation level differences between SQLite (which may expose uncommitted writes) and MySQL/MariaDB.
  • Type Safety: Added specific handling to skip unsupported tests in MariaDB relating to GUID formats until upstream connector support is clarified.

Full Changelog: 0.6.4...0.6.5