Skip to content

Add static to the lambdas for functions/aggregates/collations (and explicit names). - #38892

Open
cincuranet wants to merge 2 commits into
dotnet:mainfrom
cincuranet:sqlite-func-static
Open

Add static to the lambdas for functions/aggregates/collations (and explicit names).#38892
cincuranet wants to merge 2 commits into
dotnet:mainfrom
cincuranet:sqlite-func-static

Conversation

@cincuranet

@cincuranet cincuranet commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Review only last commit. This is on top of #38891 (and stacked PRs are not supported when creating PR from fork).

Copilot AI lite review requested due to automatic review settings September 1, 2026 09:37
@cincuranet
cincuranet requested a review from a team as a code owner September 1, 2026 09:37

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

Pull request overview

This PR improves EF Core’s SQLite provider behavior around decimal ordering by making the EF_DECIMAL collation resilient to non-standard/invalid stored values (including scientific notation), and modernizes the registration of SQLite functions/aggregates/collations by using static lambdas and explicit name: arguments.

Changes:

  • Update SQLite connection initialization to register functions/aggregates/collations with static lambdas and explicit name: usage.
  • Change EF_DECIMAL collation to use decimal.TryParse(... AllowExponent ...) and fall back to ordinal comparison for values that can’t be parsed as decimals.
  • Add a functional test covering ORDER BY on decimals when the database contains invalid/non-decimal values.
File summaries
File Description
test/EFCore.Sqlite.FunctionalTests/BuiltInDataTypesSqliteTest.cs Adds a regression test validating decimal ordering with invalid/scientific-notation stored values.
src/EFCore.Sqlite.Core/Storage/Internal/SqliteRelationalConnection.cs Updates built-in SQLite function/aggregate/collation registration and makes EF_DECIMAL collation robust to invalid values.
Review details
  • Files reviewed: 2/2 changed files
  • Comments generated: 0
  • Review effort level: Lite

💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.

Copilot AI review requested due to automatic review settings September 1, 2026 09:48

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

Review details
  • Files reviewed: 2/2 changed files
  • Comments generated: 0 new
  • Review effort level: Lite

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants