Skip to content

Commit 20c42de

Browse files
authored
Translate TimeOnly.FromDateTime and TimeOnly.FromTimeSpan (#259)
* Translate TimeOnly.FromDateTime and TimeOnly.FromTimeSpan
1 parent f30c726 commit 20c42de

File tree

6 files changed

+106
-56
lines changed

6 files changed

+106
-56
lines changed

src/EFCore.Jet/Query/ExpressionTranslators/Internal/JetTimeOnlyMethodTranslator.cs

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,11 @@ public class JetTimeOnlyMethodTranslator : IMethodCallTranslator
2626
nameof(TimeOnly.AddMinutes), new[] { typeof(double) })!;
2727
private static readonly MethodInfo IsBetweenMethod = typeof(TimeOnly).GetRuntimeMethod(
2828
nameof(TimeOnly.IsBetween), new[] { typeof(TimeOnly), typeof(TimeOnly) })!;
29+
private static readonly MethodInfo FromDateTime = typeof(TimeOnly).GetRuntimeMethod(
30+
nameof(TimeOnly.FromDateTime), [typeof(DateTime)])!;
31+
32+
private static readonly MethodInfo FromTimeSpan = typeof(TimeOnly).GetRuntimeMethod(
33+
nameof(TimeOnly.FromTimeSpan), [typeof(TimeSpan)])!;
2934

3035
private readonly ISqlExpressionFactory _sqlExpressionFactory;
3136

@@ -52,7 +57,19 @@ public JetTimeOnlyMethodTranslator(ISqlExpressionFactory sqlExpressionFactory)
5257
IReadOnlyList<SqlExpression> arguments,
5358
IDiagnosticsLogger<DbLoggerCategory.Query> logger)
5459
{
55-
if (method.DeclaringType != typeof(TimeOnly) || instance is null)
60+
if (method.DeclaringType != typeof(TimeOnly))
61+
{
62+
return null;
63+
}
64+
65+
if ((method == FromDateTime || method == FromTimeSpan)
66+
&& instance is null
67+
&& arguments.Count == 1)
68+
{
69+
return _sqlExpressionFactory.Convert(arguments[0], typeof(TimeOnly));
70+
}
71+
72+
if (instance is null)
5673
{
5774
return null;
5875
}

src/EFCore.Jet/Query/Sql/Internal/JetQuerySqlGenerator.cs

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ public class JetQuerySqlGenerator : QuerySqlGenerator, IJetExpressionVisitor
3838
{ nameof(Double), "CDBL" },
3939
{ nameof(Decimal), "CDEC" },
4040
{ nameof(DateTime), "CDATE" },
41+
{ nameof(TimeOnly), "TIMEVALUE" },
4142
};
4243

4344
private readonly ITypeMappingSource _typeMappingSource;
@@ -510,6 +511,14 @@ protected override Expression VisitSqlParameter(SqlParameterExpression sqlParame
510511
Sql.Append(")");
511512
return sqlParameterExpression;
512513
}
514+
if (sqlParameterExpression.Type == typeof(TimeOnly) && sqlParameterExpression.TypeMapping is JetTimeOnlyTypeMapping)
515+
{
516+
Sql.Append("TIMEVALUE(");
517+
base.VisitSqlParameter(sqlParameterExpression);
518+
Sql.Append(")");
519+
return sqlParameterExpression;
520+
}
521+
513522

514523
//GroupBy_param_Select_Sum_Min_Key_Max_Avg
515524
//Subquery has parameter as a projection with alias
@@ -742,7 +751,7 @@ protected Expression VisitJetConvertExpression(SqlUnaryExpression convertExpress
742751
return convertExpression;
743752
}
744753

745-
protected override string GetOperator([JetBrains.Annotations.NotNull] SqlBinaryExpression binaryExpression)
754+
protected override string GetOperator(SqlBinaryExpression binaryExpression)
746755
=> binaryExpression.OperatorType switch
747756
{
748757
ExpressionType.Add when binaryExpression.Type == typeof(string) => " & ",

test/EFCore.Jet.FunctionalTests/GreenTests/ace_2010_oledb_x86.txt

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13114,6 +13114,14 @@ EntityFrameworkCore.Jet.FunctionalTests.Query.GearsOfWarQueryJetTest.Where_TimeO
1311413114
EntityFrameworkCore.Jet.FunctionalTests.Query.GearsOfWarQueryJetTest.Where_TimeOnly_AddHours(async: True)
1311513115
EntityFrameworkCore.Jet.FunctionalTests.Query.GearsOfWarQueryJetTest.Where_TimeOnly_AddMinutes(async: False)
1311613116
EntityFrameworkCore.Jet.FunctionalTests.Query.GearsOfWarQueryJetTest.Where_TimeOnly_AddMinutes(async: True)
13117+
EntityFrameworkCore.Jet.FunctionalTests.Query.GearsOfWarQueryJetTest.Where_TimeOnly_FromDateTime_compared_to_constant(async: False)
13118+
EntityFrameworkCore.Jet.FunctionalTests.Query.GearsOfWarQueryJetTest.Where_TimeOnly_FromDateTime_compared_to_constant(async: True)
13119+
EntityFrameworkCore.Jet.FunctionalTests.Query.GearsOfWarQueryJetTest.Where_TimeOnly_FromDateTime_compared_to_property(async: False)
13120+
EntityFrameworkCore.Jet.FunctionalTests.Query.GearsOfWarQueryJetTest.Where_TimeOnly_FromDateTime_compared_to_property(async: True)
13121+
EntityFrameworkCore.Jet.FunctionalTests.Query.GearsOfWarQueryJetTest.Where_TimeOnly_FromTimeSpan_compared_to_parameter(async: False)
13122+
EntityFrameworkCore.Jet.FunctionalTests.Query.GearsOfWarQueryJetTest.Where_TimeOnly_FromTimeSpan_compared_to_parameter(async: True)
13123+
EntityFrameworkCore.Jet.FunctionalTests.Query.GearsOfWarQueryJetTest.Where_TimeOnly_FromTimeSpan_compared_to_property(async: False)
13124+
EntityFrameworkCore.Jet.FunctionalTests.Query.GearsOfWarQueryJetTest.Where_TimeOnly_FromTimeSpan_compared_to_property(async: True)
1311713125
EntityFrameworkCore.Jet.FunctionalTests.Query.GearsOfWarQueryJetTest.Where_TimeOnly_Hour(async: False)
1311813126
EntityFrameworkCore.Jet.FunctionalTests.Query.GearsOfWarQueryJetTest.Where_TimeOnly_Hour(async: True)
1311913127
EntityFrameworkCore.Jet.FunctionalTests.Query.GearsOfWarQueryJetTest.Where_TimeOnly_IsBetween(async: False)
@@ -20188,6 +20196,14 @@ EntityFrameworkCore.Jet.FunctionalTests.Query.TPCGearsOfWarQueryJetTest.Where_Ti
2018820196
EntityFrameworkCore.Jet.FunctionalTests.Query.TPCGearsOfWarQueryJetTest.Where_TimeOnly_AddHours(async: True)
2018920197
EntityFrameworkCore.Jet.FunctionalTests.Query.TPCGearsOfWarQueryJetTest.Where_TimeOnly_AddMinutes(async: False)
2019020198
EntityFrameworkCore.Jet.FunctionalTests.Query.TPCGearsOfWarQueryJetTest.Where_TimeOnly_AddMinutes(async: True)
20199+
EntityFrameworkCore.Jet.FunctionalTests.Query.TPCGearsOfWarQueryJetTest.Where_TimeOnly_FromDateTime_compared_to_constant(async: False)
20200+
EntityFrameworkCore.Jet.FunctionalTests.Query.TPCGearsOfWarQueryJetTest.Where_TimeOnly_FromDateTime_compared_to_constant(async: True)
20201+
EntityFrameworkCore.Jet.FunctionalTests.Query.TPCGearsOfWarQueryJetTest.Where_TimeOnly_FromDateTime_compared_to_property(async: False)
20202+
EntityFrameworkCore.Jet.FunctionalTests.Query.TPCGearsOfWarQueryJetTest.Where_TimeOnly_FromDateTime_compared_to_property(async: True)
20203+
EntityFrameworkCore.Jet.FunctionalTests.Query.TPCGearsOfWarQueryJetTest.Where_TimeOnly_FromTimeSpan_compared_to_parameter(async: False)
20204+
EntityFrameworkCore.Jet.FunctionalTests.Query.TPCGearsOfWarQueryJetTest.Where_TimeOnly_FromTimeSpan_compared_to_parameter(async: True)
20205+
EntityFrameworkCore.Jet.FunctionalTests.Query.TPCGearsOfWarQueryJetTest.Where_TimeOnly_FromTimeSpan_compared_to_property(async: False)
20206+
EntityFrameworkCore.Jet.FunctionalTests.Query.TPCGearsOfWarQueryJetTest.Where_TimeOnly_FromTimeSpan_compared_to_property(async: True)
2019120207
EntityFrameworkCore.Jet.FunctionalTests.Query.TPCGearsOfWarQueryJetTest.Where_TimeOnly_Hour(async: False)
2019220208
EntityFrameworkCore.Jet.FunctionalTests.Query.TPCGearsOfWarQueryJetTest.Where_TimeOnly_Hour(async: True)
2019320209
EntityFrameworkCore.Jet.FunctionalTests.Query.TPCGearsOfWarQueryJetTest.Where_TimeOnly_IsBetween(async: False)
@@ -22021,6 +22037,14 @@ EntityFrameworkCore.Jet.FunctionalTests.Query.TPTGearsOfWarQueryJetTest.Where_Ti
2202122037
EntityFrameworkCore.Jet.FunctionalTests.Query.TPTGearsOfWarQueryJetTest.Where_TimeOnly_AddHours(async: True)
2202222038
EntityFrameworkCore.Jet.FunctionalTests.Query.TPTGearsOfWarQueryJetTest.Where_TimeOnly_AddMinutes(async: False)
2202322039
EntityFrameworkCore.Jet.FunctionalTests.Query.TPTGearsOfWarQueryJetTest.Where_TimeOnly_AddMinutes(async: True)
22040+
EntityFrameworkCore.Jet.FunctionalTests.Query.TPTGearsOfWarQueryJetTest.Where_TimeOnly_FromDateTime_compared_to_constant(async: False)
22041+
EntityFrameworkCore.Jet.FunctionalTests.Query.TPTGearsOfWarQueryJetTest.Where_TimeOnly_FromDateTime_compared_to_constant(async: True)
22042+
EntityFrameworkCore.Jet.FunctionalTests.Query.TPTGearsOfWarQueryJetTest.Where_TimeOnly_FromDateTime_compared_to_property(async: False)
22043+
EntityFrameworkCore.Jet.FunctionalTests.Query.TPTGearsOfWarQueryJetTest.Where_TimeOnly_FromDateTime_compared_to_property(async: True)
22044+
EntityFrameworkCore.Jet.FunctionalTests.Query.TPTGearsOfWarQueryJetTest.Where_TimeOnly_FromTimeSpan_compared_to_parameter(async: False)
22045+
EntityFrameworkCore.Jet.FunctionalTests.Query.TPTGearsOfWarQueryJetTest.Where_TimeOnly_FromTimeSpan_compared_to_parameter(async: True)
22046+
EntityFrameworkCore.Jet.FunctionalTests.Query.TPTGearsOfWarQueryJetTest.Where_TimeOnly_FromTimeSpan_compared_to_property(async: False)
22047+
EntityFrameworkCore.Jet.FunctionalTests.Query.TPTGearsOfWarQueryJetTest.Where_TimeOnly_FromTimeSpan_compared_to_property(async: True)
2202422048
EntityFrameworkCore.Jet.FunctionalTests.Query.TPTGearsOfWarQueryJetTest.Where_TimeOnly_Hour(async: False)
2202522049
EntityFrameworkCore.Jet.FunctionalTests.Query.TPTGearsOfWarQueryJetTest.Where_TimeOnly_Hour(async: True)
2202622050
EntityFrameworkCore.Jet.FunctionalTests.Query.TPTGearsOfWarQueryJetTest.Where_TimeOnly_IsBetween(async: False)

test/EFCore.Jet.FunctionalTests/Query/GearsOfWarQueryJetTest.cs

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -8925,11 +8925,11 @@ public override async Task Where_TimeOnly_FromDateTime_compared_to_property(bool
89258925
await base.Where_TimeOnly_FromDateTime_compared_to_property(async);
89268926

89278927
AssertSql(
8928-
"""
8929-
SELECT [t].[Id] AS [TagId], [m].[Id] AS [MissionId]
8930-
FROM [Tags] AS [t]
8931-
CROSS JOIN [Missions] AS [m]
8932-
WHERE CAST([t].[IssueDate] AS time) = [m].[Time]
8928+
"""
8929+
SELECT `t`.`Id` AS `TagId`, `m`.`Id` AS `MissionId`
8930+
FROM `Tags` AS `t`,
8931+
`Missions` AS `m`
8932+
WHERE TIMEVALUE(`t`.`IssueDate`) = `m`.`Time`
89338933
""");
89348934
}
89358935

@@ -8953,10 +8953,10 @@ public override async Task Where_TimeOnly_FromDateTime_compared_to_constant(bool
89538953
await base.Where_TimeOnly_FromDateTime_compared_to_constant(async);
89548954

89558955
AssertSql(
8956-
"""
8957-
SELECT [t].[Id], [t].[GearNickName], [t].[GearSquadId], [t].[IssueDate], [t].[Note]
8958-
FROM [Tags] AS [t]
8959-
WHERE CAST(DATEADD(hour, CAST(CAST(CAST(LEN([t].[Note]) AS int) AS float) AS int), [t].[IssueDate]) AS time) > '09:00:00'
8956+
"""
8957+
SELECT `t`.`Id`, `t`.`GearNickName`, `t`.`GearSquadId`, `t`.`IssueDate`, `t`.`Note`
8958+
FROM `Tags` AS `t`
8959+
WHERE IIF(DATEADD('h', CDBL(IIF(LEN(`t`.`Note`) IS NULL, NULL, CLNG(LEN(`t`.`Note`)))), `t`.`IssueDate`) IS NULL, NULL, TIMEVALUE(DATEADD('h', CDBL(IIF(LEN(`t`.`Note`) IS NULL, NULL, CLNG(LEN(`t`.`Note`)))), `t`.`IssueDate`))) > TIMEVALUE('09:00:00')
89608960
""");
89618961
}
89628962

@@ -8965,10 +8965,10 @@ public override async Task Where_TimeOnly_FromTimeSpan_compared_to_property(bool
89658965
await base.Where_TimeOnly_FromTimeSpan_compared_to_property(async);
89668966

89678967
AssertSql(
8968-
"""
8969-
SELECT [m].[Id], [m].[BriefingDocument], [m].[BriefingDocumentFileExtension], [m].[CodeName], [m].[Date], [m].[Difficulty], [m].[Duration], [m].[Rating], [m].[Time], [m].[Timeline]
8970-
FROM [Missions] AS [m]
8971-
WHERE CAST([m].[Duration] AS time) < [m].[Time]
8968+
"""
8969+
SELECT `m`.`Id`, `m`.`CodeName`, `m`.`Date`, `m`.`Difficulty`, `m`.`Duration`, `m`.`Rating`, `m`.`Time`, `m`.`Timeline`
8970+
FROM `Missions` AS `m`
8971+
WHERE TIMEVALUE(`m`.`Duration`) < `m`.`Time`
89728972
""");
89738973
}
89748974

@@ -8977,12 +8977,12 @@ public override async Task Where_TimeOnly_FromTimeSpan_compared_to_parameter(boo
89778977
await base.Where_TimeOnly_FromTimeSpan_compared_to_parameter(async);
89788978

89798979
AssertSql(
8980-
"""
8981-
@__time_0='01:02' (DbType = Time)
8980+
"""
8981+
@__time_0='01:02:03'
89828982
8983-
SELECT [m].[Id], [m].[BriefingDocument], [m].[BriefingDocumentFileExtension], [m].[CodeName], [m].[Date], [m].[Difficulty], [m].[Duration], [m].[Rating], [m].[Time], [m].[Timeline]
8984-
FROM [Missions] AS [m]
8985-
WHERE CAST([m].[Duration] AS time) = @__time_0
8983+
SELECT `m`.`Id`, `m`.`CodeName`, `m`.`Date`, `m`.`Difficulty`, `m`.`Duration`, `m`.`Rating`, `m`.`Time`, `m`.`Timeline`
8984+
FROM `Missions` AS `m`
8985+
WHERE TIMEVALUE(`m`.`Duration`) = TIMEVALUE(@__time_0)
89868986
""");
89878987
}
89888988

test/EFCore.Jet.FunctionalTests/Query/TPCGearsOfWarQueryJetTest.cs

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -11821,11 +11821,11 @@ public override async Task Where_TimeOnly_FromDateTime_compared_to_property(bool
1182111821
await base.Where_TimeOnly_FromDateTime_compared_to_property(async);
1182211822

1182311823
AssertSql(
11824-
"""
11825-
SELECT [t].[Id] AS [TagId], [m].[Id] AS [MissionId]
11826-
FROM [Tags] AS [t]
11827-
CROSS JOIN [Missions] AS [m]
11828-
WHERE CAST([t].[IssueDate] AS time) = [m].[Time]
11824+
"""
11825+
SELECT `t`.`Id` AS `TagId`, `m`.`Id` AS `MissionId`
11826+
FROM `Tags` AS `t`,
11827+
`Missions` AS `m`
11828+
WHERE TIMEVALUE(`t`.`IssueDate`) = `m`.`Time`
1182911829
""");
1183011830
}
1183111831

@@ -11855,10 +11855,10 @@ public override async Task Where_TimeOnly_FromDateTime_compared_to_constant(bool
1185511855
await base.Where_TimeOnly_FromDateTime_compared_to_constant(async);
1185611856

1185711857
AssertSql(
11858-
"""
11859-
SELECT [t].[Id], [t].[GearNickName], [t].[GearSquadId], [t].[IssueDate], [t].[Note]
11860-
FROM [Tags] AS [t]
11861-
WHERE CAST(DATEADD(hour, CAST(CAST(CAST(LEN([t].[Note]) AS int) AS float) AS int), [t].[IssueDate]) AS time) > '09:00:00'
11858+
"""
11859+
SELECT `t`.`Id`, `t`.`GearNickName`, `t`.`GearSquadId`, `t`.`IssueDate`, `t`.`Note`
11860+
FROM `Tags` AS `t`
11861+
WHERE IIF(DATEADD('h', CDBL(IIF(LEN(`t`.`Note`) IS NULL, NULL, CLNG(LEN(`t`.`Note`)))), `t`.`IssueDate`) IS NULL, NULL, TIMEVALUE(DATEADD('h', CDBL(IIF(LEN(`t`.`Note`) IS NULL, NULL, CLNG(LEN(`t`.`Note`)))), `t`.`IssueDate`))) > TIMEVALUE('09:00:00')
1186211862
""");
1186311863
}
1186411864

@@ -11867,10 +11867,10 @@ public override async Task Where_TimeOnly_FromTimeSpan_compared_to_property(bool
1186711867
await base.Where_TimeOnly_FromTimeSpan_compared_to_property(async);
1186811868

1186911869
AssertSql(
11870-
"""
11871-
SELECT [m].[Id], [m].[CodeName], [m].[Date], [m].[Difficulty], [m].[Duration], [m].[Rating], [m].[Time], [m].[Timeline]
11872-
FROM [Missions] AS [m]
11873-
WHERE CAST([m].[Duration] AS time) < [m].[Time]
11870+
"""
11871+
SELECT `m`.`Id`, `m`.`CodeName`, `m`.`Date`, `m`.`Difficulty`, `m`.`Duration`, `m`.`Rating`, `m`.`Time`, `m`.`Timeline`
11872+
FROM `Missions` AS `m`
11873+
WHERE TIMEVALUE(`m`.`Duration`) < `m`.`Time`
1187411874
""");
1187511875
}
1187611876

@@ -11879,12 +11879,12 @@ public override async Task Where_TimeOnly_FromTimeSpan_compared_to_parameter(boo
1187911879
await base.Where_TimeOnly_FromTimeSpan_compared_to_parameter(async);
1188011880

1188111881
AssertSql(
11882-
"""
11883-
@__time_0='01:02' (DbType = Time)
11882+
"""
11883+
@__time_0='01:02:03'
1188411884

11885-
SELECT [m].[Id], [m].[CodeName], [m].[Date], [m].[Difficulty], [m].[Duration], [m].[Rating], [m].[Time], [m].[Timeline]
11886-
FROM [Missions] AS [m]
11887-
WHERE CAST([m].[Duration] AS time) = @__time_0
11885+
SELECT `m`.`Id`, `m`.`CodeName`, `m`.`Date`, `m`.`Difficulty`, `m`.`Duration`, `m`.`Rating`, `m`.`Time`, `m`.`Timeline`
11886+
FROM `Missions` AS `m`
11887+
WHERE TIMEVALUE(`m`.`Duration`) = TIMEVALUE(@__time_0)
1188811888
""");
1188911889
}
1189011890

test/EFCore.Jet.FunctionalTests/Query/TPTGearsOfWarQueryJetTest.cs

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -9522,11 +9522,11 @@ public override async Task Where_TimeOnly_FromDateTime_compared_to_property(bool
95229522
await base.Where_TimeOnly_FromDateTime_compared_to_property(async);
95239523

95249524
AssertSql(
9525-
"""
9526-
SELECT [t].[Id] AS [TagId], [m].[Id] AS [MissionId]
9527-
FROM [Tags] AS [t]
9528-
CROSS JOIN [Missions] AS [m]
9529-
WHERE CAST([t].[IssueDate] AS time) = [m].[Time]
9525+
"""
9526+
SELECT `t`.`Id` AS `TagId`, `m`.`Id` AS `MissionId`
9527+
FROM `Tags` AS `t`,
9528+
`Missions` AS `m`
9529+
WHERE TIMEVALUE(`t`.`IssueDate`) = `m`.`Time`
95309530
""");
95319531
}
95329532

@@ -9553,10 +9553,10 @@ public override async Task Where_TimeOnly_FromDateTime_compared_to_constant(bool
95539553
await base.Where_TimeOnly_FromDateTime_compared_to_constant(async);
95549554

95559555
AssertSql(
9556-
"""
9557-
SELECT [t].[Id], [t].[GearNickName], [t].[GearSquadId], [t].[IssueDate], [t].[Note]
9558-
FROM [Tags] AS [t]
9559-
WHERE CAST(DATEADD(hour, CAST(CAST(CAST(LEN([t].[Note]) AS int) AS float) AS int), [t].[IssueDate]) AS time) > '09:00:00'
9556+
"""
9557+
SELECT `t`.`Id`, `t`.`GearNickName`, `t`.`GearSquadId`, `t`.`IssueDate`, `t`.`Note`
9558+
FROM `Tags` AS `t`
9559+
WHERE IIF(DATEADD('h', CDBL(IIF(LEN(`t`.`Note`) IS NULL, NULL, CLNG(LEN(`t`.`Note`)))), `t`.`IssueDate`) IS NULL, NULL, TIMEVALUE(DATEADD('h', CDBL(IIF(LEN(`t`.`Note`) IS NULL, NULL, CLNG(LEN(`t`.`Note`)))), `t`.`IssueDate`))) > TIMEVALUE('09:00:00')
95609560
""");
95619561
}
95629562

@@ -9565,10 +9565,10 @@ public override async Task Where_TimeOnly_FromTimeSpan_compared_to_property(bool
95659565
await base.Where_TimeOnly_FromTimeSpan_compared_to_property(async);
95669566

95679567
AssertSql(
9568-
"""
9569-
SELECT [m].[Id], [m].[CodeName], [m].[Date], [m].[Difficulty], [m].[Duration], [m].[Rating], [m].[Time], [m].[Timeline]
9570-
FROM [Missions] AS [m]
9571-
WHERE CAST([m].[Duration] AS time) < [m].[Time]
9568+
"""
9569+
SELECT `m`.`Id`, `m`.`CodeName`, `m`.`Date`, `m`.`Difficulty`, `m`.`Duration`, `m`.`Rating`, `m`.`Time`, `m`.`Timeline`
9570+
FROM `Missions` AS `m`
9571+
WHERE TIMEVALUE(`m`.`Duration`) < `m`.`Time`
95729572
""");
95739573
}
95749574

@@ -9577,12 +9577,12 @@ public override async Task Where_TimeOnly_FromTimeSpan_compared_to_parameter(boo
95779577
await base.Where_TimeOnly_FromTimeSpan_compared_to_parameter(async);
95789578

95799579
AssertSql(
9580-
"""
9581-
@__time_0='01:02' (DbType = Time)
9580+
"""
9581+
@__time_0='01:02:03'
95829582
9583-
SELECT [m].[Id], [m].[CodeName], [m].[Date], [m].[Difficulty], [m].[Duration], [m].[Rating], [m].[Time], [m].[Timeline]
9584-
FROM [Missions] AS [m]
9585-
WHERE CAST([m].[Duration] AS time) = @__time_0
9583+
SELECT `m`.`Id`, `m`.`CodeName`, `m`.`Date`, `m`.`Difficulty`, `m`.`Duration`, `m`.`Rating`, `m`.`Time`, `m`.`Timeline`
9584+
FROM `Missions` AS `m`
9585+
WHERE TIMEVALUE(`m`.`Duration`) = TIMEVALUE(@__time_0)
95869586
""");
95879587
}
95889588

0 commit comments

Comments
 (0)