Add static to the lambdas for functions/aggregates/collations (and explicit names). - #38892
Open
cincuranet wants to merge 2 commits into
Open
Add static to the lambdas for functions/aggregates/collations (and explicit names).#38892cincuranet wants to merge 2 commits into
static to the lambdas for functions/aggregates/collations (and explicit names).#38892cincuranet wants to merge 2 commits into
Conversation
There was a problem hiding this comment.
🟢 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
staticlambdas and explicitname:usage. - Change
EF_DECIMALcollation to usedecimal.TryParse(... AllowExponent ...)and fall back to ordinal comparison for values that can’t be parsed as decimals. - Add a functional test covering
ORDER BYon 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.
cincuranet
force-pushed
the
sqlite-func-static
branch
from
September 1, 2026 09:48
d39f174 to
59e38fa
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Review only last commit. This is on top of #38891 (and stacked PRs are not supported when creating PR from fork).