Add support for BigInteger, Int128, and UInt128 in SqliteValueBinder#37492
Open
MaikyOzr wants to merge 14 commits intodotnet:mainfrom
Open
Add support for BigInteger, Int128, and UInt128 in SqliteValueBinder#37492MaikyOzr wants to merge 14 commits intodotnet:mainfrom
MaikyOzr wants to merge 14 commits intodotnet:mainfrom
Conversation
- Bind Int128, UInt128, and BigInteger parameters as TEXT in SQLite. - Add provider-level tests to verify correct binding of these large numeric types. - This change only affects parameter binding; reading values back still returns string.
Add support for BigInteger, Int128, and UInt128 in SqliteValueBinder
249ae47 to
6b86657
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated 5 comments.
Comments suppressed due to low confidence (1)
test/Microsoft.Data.Sqlite.Tests/SqliteParameterTest.cs:670
- The new types BigInteger, Int128, and UInt128 should be added to the TypesData collection to ensure comprehensive test coverage via the existing SqliteType_is_inferred_from_value test. This would follow the pattern established for other supported types like decimal (line 646) and provide additional test coverage beyond the specific binding tests.
public static IEnumerable<object[]> TypesData
=> new List<object[]>
{
new object[] { default(DateTime), SqliteType.Text },
new object[] { default(DateTimeOffset), SqliteType.Text },
new object[] { DBNull.Value, SqliteType.Text },
new object[] { 0m, SqliteType.Text },
new object[] { default(Guid), SqliteType.Text },
new object[] { default(TimeSpan), SqliteType.Text },
new object[] { default(TimeSpan), SqliteType.Text },
#if NET6_0_OR_GREATER
new object[] { default(DateOnly), SqliteType.Text },
new object[] { default(TimeOnly), SqliteType.Text },
#endif
new object[] { 'A', SqliteType.Text },
new object[] { "", SqliteType.Text },
new object[] { false, SqliteType.Integer },
new object[] { (byte)0, SqliteType.Integer },
new object[] { 0, SqliteType.Integer },
new object[] { 0L, SqliteType.Integer },
new object[] { (sbyte)0, SqliteType.Integer },
new object[] { (short)0, SqliteType.Integer },
new object[] { 0u, SqliteType.Integer },
new object[] { 0ul, SqliteType.Integer },
new object[] { (ushort)0, SqliteType.Integer },
new object[] { 0.0, SqliteType.Real },
new object[] { 0f, SqliteType.Real },
new object[] { Array.Empty<byte>(), SqliteType.Blob },
new object[] { new Memory<byte>([]), SqliteType.Blob },
new object[] { new ReadOnlyMemory<byte>([]), SqliteType.Blob },
};
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Author
|
@copilot open a new pull request to apply changes based on the comments in this thread |
Author
|
The current .NET SDK does not support targeting .NET 11.0. Either target .NET 10.0 or lower, or use a version of the .NET SDK that supports .NET 11.0. Download the .NET SDK from https://aka.ms/dotnet/download .NET 11 SDK is not available for download on the official Microsoft site, so I cannot install it. Please advise which supported .NET version should be used instead. |
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.
Fixes #30930