-
Notifications
You must be signed in to change notification settings - Fork 0
Upgrade from 8.0.1 to 8.0.2 #11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR upgrades the SingleStore Entity Framework Core provider from version 8.0.1 to 8.0.2. The primary changes include adding support for timezone conversions via EF.Functions.ConvertTimeZone(), fixing sql_mode related bugs for master/admin connections, and addressing computed column annotations for RowVersion properties.
Changes:
- Added
CONVERT_TZsupport through newEF.Functions.ConvertTimeZone()methods with corresponding translation logic - Fixed
sql_modebug that was incorrectly applying settings to master/admin connections - Updated computed column strategy to properly handle
RowVersionproperties and exclude them fromSingleStoreValueGenerationStrategy.ComputedColumnannotations - Updated project file references to support configurable build configurations via
LocalEFCoreRepositoryConfiguration - Updated dependencies to EF Core 8.0.2 and System.Text.Json 8.0.2
Reviewed changes
Copilot reviewed 39 out of 40 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| Version.props | Updated version from 8.0.1 to 8.0.2 |
| Dependencies.targets | Updated EF Core and related package versions to 8.0.2 |
| Directory.Build.props | Added configuration properties for local EF Core repository builds |
| src/EFCore.SingleStore/Extensions/SingleStoreDbFunctionsExtensions.cs | Added 10 new ConvertTimeZone method overloads for timezone conversion support |
| src/EFCore.SingleStore/Query/ExpressionTranslators/Internal/SingleStoreDbFunctionsExtensionsMethodTranslator.cs | Implemented translation logic for ConvertTimeZone methods to SQL CONVERT_TZ function |
| src/EFCore.SingleStore/Query/Internal/SingleStoreDateTimeMemberTranslator.cs | Added support for translating DateTimeOffset.DateTime, UtcDateTime, and LocalDateTime properties |
| src/EFCore.SingleStore/Storage/Internal/SingleStoreRelationalConnection.cs | Fixed sql_mode bug by checking IsMasterConnection flag and refactored to use direct command execution |
| src/EFCore.SingleStore/Extensions/SingleStorePropertyExtensions.cs | Updated IsCompatibleComputedColumn to exclude concurrency token properties from computed column strategy |
| src/EFCore.SingleStore/Infrastructure/SingleStoreDbContextOptionsBuilder.cs | Added SessionTimeZone configuration method |
| src/EFCore.SingleStore/Infrastructure/Internal/SingleStoreOptionsExtension.cs | Added SessionTimeZone property to options extension |
| src/EFCore.SingleStore/Query/ExpressionVisitors/Internal/SingleStoreQuerySqlGenerator.cs | Removed custom VisitOrdering override and added empty values validation |
| test/EFCore.SingleStore.Tests/Query/SingleStoreTimeZoneTest.cs | Added comprehensive tests for timezone conversion functionality |
| Multiple .csproj files | Updated HintPath references to use LocalEFCoreRepositoryConfiguration variable |
| Multiple test files | Updated test expectations to match EF Core 8.0.2 behavior for primitive collections and query generation |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| public virtual SingleStoreDbContextOptionsBuilder SessionTimeZone(string offset) | ||
| { | ||
| if (string.IsNullOrWhiteSpace(offset)) | ||
| throw new ArgumentException("Session time zone offset must be a value like '+02:00' or '-08:00'.", nameof(offset)); | ||
|
|
||
| var extension = OptionsBuilder.Options.FindExtension<SingleStoreOptionsExtension>() | ||
| ?? new SingleStoreOptionsExtension(); | ||
|
|
||
| ((IDbContextOptionsBuilderInfrastructure)OptionsBuilder) | ||
| .AddOrUpdateExtension(extension.WithSessionTimeZone(offset)); | ||
|
|
||
| return this; | ||
| } |
Copilot
AI
Jan 23, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The public method SessionTimeZone is missing XML documentation comments. Other public methods in this class have XML doc comments (e.g., EnableStringComparisonTranslations, EnablePrimitiveCollectionsSupport). Add XML documentation that describes the purpose, parameters, and return value of this method to maintain consistency with the rest of the codebase.
| { | ||
| "Data": { | ||
| "ConnectionString": "server=SINGLESTORE_HOST;user id=SQL_USER_NAME;password=SQL_USER_PASSWORD;port=3306;database=singlestoretest;sslmode=None", | ||
| "ConnectionString": "server=SINGLESTORE_HOST;user id=SQL_USER_NAME;password=SQL_USER_PASSWORD;port=3306;database=singlestoretest;sslmode=None;allow user variables=True;", |
Copilot
AI
Jan 23, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The connection string has a trailing semicolon at the end. While this is not technically incorrect, it's inconsistent with the pattern used in other test configuration files. For consistency, consider removing the trailing semicolon.
| "ConnectionString": "server=SINGLESTORE_HOST;user id=SQL_USER_NAME;password=SQL_USER_PASSWORD;port=3306;database=singlestoretest;sslmode=None;allow user variables=True;", | |
| "ConnectionString": "server=SINGLESTORE_HOST;user id=SQL_USER_NAME;password=SQL_USER_PASSWORD;port=3306;database=singlestoretest;sslmode=None;allow user variables=True", |
CONVERT_TZviaEF.Functions.ConvertTimeZone()sql_moderelated bugs in regards to master/admin connectionsSingleStoreValueGenerationStrategy.ComputedColumnannotations forRowVersionand fix computed columns