Skip to content
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

[WIP] Translation of TimeOnly.FromTimeSpan on SQL Server no-op #34114

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,8 @@ public SqlServerTimeOnlyMethodTranslator(ISqlExpressionFactory sqlExpressionFact

if ((method == FromDateTime || method == FromTimeSpan)
&& instance is null
&& arguments.Count == 1)
&& arguments.Count == 1
&& arguments[0].Type != typeof(TimeSpan))
{
return _sqlExpressionFactory.Convert(arguments[0], typeof(TimeOnly));
kuznetsovvj marked this conversation as resolved.
Show resolved Hide resolved
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9352,7 +9352,7 @@ public override async Task Where_TimeOnly_FromTimeSpan_compared_to_property(bool
"""
SELECT [m].[Id], [m].[BriefingDocument], [m].[BriefingDocumentFileExtension], [m].[CodeName], [m].[Date], [m].[Difficulty], [m].[Duration], [m].[Rating], [m].[Time], [m].[Timeline]
FROM [Missions] AS [m]
WHERE CAST([m].[Duration] AS time) < [m].[Time]
WHERE [m].[Duration] < [m].[Time]
""");
}

Expand All @@ -9366,7 +9366,7 @@ public override async Task Where_TimeOnly_FromTimeSpan_compared_to_parameter(boo

SELECT [m].[Id], [m].[BriefingDocument], [m].[BriefingDocumentFileExtension], [m].[CodeName], [m].[Date], [m].[Difficulty], [m].[Duration], [m].[Rating], [m].[Time], [m].[Timeline]
FROM [Missions] AS [m]
WHERE CAST([m].[Duration] AS time) = @__time_0
WHERE [m].[Duration] = @__time_0
""");
}

Expand All @@ -9378,7 +9378,7 @@ public override async Task Order_by_TimeOnly_FromTimeSpan(bool async)
"""
SELECT [m].[Id], [m].[BriefingDocument], [m].[BriefingDocumentFileExtension], [m].[CodeName], [m].[Date], [m].[Difficulty], [m].[Duration], [m].[Rating], [m].[Time], [m].[Timeline]
FROM [Missions] AS [m]
ORDER BY CAST([m].[Duration] AS time)
ORDER BY [m].[Duration]
""");
}

Expand Down
Loading