Add Half type support for SQLite (#30931)#37480
Closed
kimjaejung96 wants to merge 3 commits into
Closed
Conversation
- Use primary constructor in SqlServerJsonFunctionTranslator - Use expression-bodied method with ternary operator - Use trimming-friendly method matching (name + declaring type instead of reflection) - Remove [NotParameterized] from path parameter - Remove RelationalDbFunctionsTest.cs (throw tests not useful) - Replace literal-only test with column-based test (JsonExists_with_column)
- Add Half support in SqliteValueReader.GetFieldValue<T> - Add Half binding in SqliteValueBinder - Add SqliteHalfTypeMapping for EF Core SQLite provider - SQLite-specific implementation only (per maintainer feedback) - Use REAL store type, DbType is null (no DbType.Half exists) Fixes dotnet#30931
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.
Summary
Add Half (16-bit floating point) type support for Microsoft.Data.Sqlite and EF Core SQLite provider.
Fixes #30931
Changes
Microsoft.Data.Sqlite (ADO.NET layer)
GetFieldValue<Half>supportEF Core SQLite Provider
Tests
Design Notes
Based on #35328 feedback:
EFCore.Relational(no HalfTypeMapping in common layer)DbType-System.Data.DbTypehas no Half value, so DbType is null#if NET6_0_OR_GREATERfornetstandard2.0compatibility