Skip to content
Merged
Show file tree
Hide file tree
Changes from 14 commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
da54696
initial net10 update
ChrisJollyAU Jul 9, 2025
fc8873f
more test work
ChrisJollyAU Jul 15, 2025
5d2d0b7
update to preview6
ChrisJollyAU Jul 16, 2025
3c4af07
green test update 1
ChrisJollyAU Jul 20, 2025
fc507b2
more updates
ChrisJollyAU Jul 21, 2025
2899189
Use FIX for truncate to match Math.Truncate
ChrisJollyAU Jul 22, 2025
015dc3d
Don't attempt to generate a LEAST when propogating multiple limits fo…
ChrisJollyAU Jul 22, 2025
9287165
more fixes
ChrisJollyAU Jul 22, 2025
fc5437d
try wait for another test if deleting db doesnt work
ChrisJollyAU Jul 23, 2025
0675fcc
work on ODBC tests
ChrisJollyAU Jul 24, 2025
ae3d7ad
more odbc
ChrisJollyAU Jul 24, 2025
913eada
more updates
ChrisJollyAU Jul 24, 2025
07c549b
tests
ChrisJollyAU Jul 24, 2025
b18b833
update version
ChrisJollyAU Jul 25, 2025
dc3770d
Merge branch 'master' into net10
ChrisJollyAU Jul 26, 2025
ea4469c
Update test/EFCore.Jet.FunctionalTests/Query/Relationships/Projection…
ChrisJollyAU Jul 26, 2025
0d31a9e
Update test/EFCore.Jet.FunctionalTests/Query/Relationships/Projection…
ChrisJollyAU Jul 26, 2025
bb3b7e1
Update test/EFCore.Jet.FunctionalTests/Query/Relationships/Projection…
ChrisJollyAU Jul 26, 2025
42ec830
Update test/EFCore.Jet.FunctionalTests/Query/Relationships/Projection…
ChrisJollyAU Jul 26, 2025
241894e
graph updates complex foreign key fixes
ChrisJollyAU Jul 27, 2025
e790c7b
proxy graph foreign key adjustments
ChrisJollyAU Jul 28, 2025
f5e2642
other tests
ChrisJollyAU Jul 28, 2025
edc41f1
[GitHub Actions] Update green tests.
invalid-email-address Jul 29, 2025
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
8 changes: 4 additions & 4 deletions Dependencies.targets
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<Project>
<PropertyGroup>
<DotNetVersion>[9.0.6,9.0.999]</DotNetVersion>
<EFCoreVersion>[9.0.6,9.0.999]</EFCoreVersion>
<MSLibVersion>[9.0.6,9.0.999]</MSLibVersion>
<DotNetVersion>[10.0.0-preview.6.25358.103,10.0.999]</DotNetVersion>
<EFCoreVersion>[10.0.0-preview.6.25358.103,10.0.999]</EFCoreVersion>
<MSLibVersion>[10.0.0-preview.6.25358.103,10.0.999]</MSLibVersion>
</PropertyGroup>

<ItemGroup>
Expand Down Expand Up @@ -37,7 +37,7 @@
<!-- EFCore.Jet.FunctionalTests -->
<PackageReference Update="xunit.core" Version="2.9.3"/>
<PackageReference Update="xunit.assert" Version="2.9.3" />
<PackageReference Update="xunit.runner.visualstudio" Version="3.1.1" />
<PackageReference Update="xunit.runner.visualstudio" Version="3.1.2" />
<PackageReference Update="xunit.runner.console" Version="2.9.3" />
<PackageReference Update="Microsoft.Extensions.Configuration.FileExtensions" Version="$(MSLibVersion)" />
<PackageReference Update="NetTopologySuite" Version="2.5.0" />
Expand Down
6 changes: 3 additions & 3 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<Company>CirrusRed</Company>
<Copyright>Copyright © 2017-$([System.DateTime]::Now.Year) CirrusRed</Copyright>
<TreatWarningsAsErrors>True</TreatWarningsAsErrors>
<LangVersion>13.0</LangVersion>
<LangVersion>preview</LangVersion>
<Nullable>enable</Nullable>
<DebugType>portable</DebugType>
<IsPackable>False</IsPackable>
Expand All @@ -24,10 +24,10 @@
</PropertyGroup>

<PropertyGroup>
<EfCoreTargetFramework>net8.0</EfCoreTargetFramework>
<EfCoreTargetFramework>net10.0</EfCoreTargetFramework>
<EfCoreTestTargetFramework>$(EfCoreTargetFramework)</EfCoreTestTargetFramework>
<JetTargetFramework>$(EfCoreTargetFramework)</JetTargetFramework>
<JetTestTargetFramework>net9.0</JetTestTargetFramework>
<JetTestTargetFramework>net10.0</JetTestTargetFramework>
<JetTestWindowsOnlyTargetFramework>$(JetTestTargetFramework)-windows7.0</JetTestWindowsOnlyTargetFramework>
</PropertyGroup>

Expand Down
6 changes: 3 additions & 3 deletions Version.props
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
Bump-up to the next iteration immediately after a release, so that subsequent daily builds are named
correctly.
-->
<VersionPrefix>9.0.0</VersionPrefix>
<PreReleaseVersionLabel>rtm</PreReleaseVersionLabel>
<PreReleaseVersionIteration>0</PreReleaseVersionIteration>
<VersionPrefix>10.0.0</VersionPrefix>
<PreReleaseVersionLabel>alpha</PreReleaseVersionLabel>
<PreReleaseVersionIteration>1</PreReleaseVersionIteration>

<!--
The following properties will automatically be set by CI builds when appropriate:
Expand Down
4 changes: 2 additions & 2 deletions global.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"sdk": {
"version": "9.0.100",
"allowPrerelease": false,
"version": "10.0.100-preview.6.25358.103",
"allowPrerelease": true,
"rollForward": "latestFeature"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ public class JetMathTranslator(ISqlExpressionFactory sqlExpressionFactory) : IMe
resultType = typeof(double);
}
var result = (SqlExpression)_sqlExpressionFactory.Function(
"INT",
"FIX",
[argument],
nullable: true,
argumentsPropagateNullability: [true],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,24 @@ public class JetStringMethodTranslator(ISqlExpressionFactory sqlExpressionFactor
{
private readonly JetSqlExpressionFactory _sqlExpressionFactory = (JetSqlExpressionFactory)sqlExpressionFactory;

private static readonly MethodInfo IndexOfMethodInfo
private static readonly MethodInfo IndexOfMethodInfoString
= typeof(string).GetRuntimeMethod(nameof(string.IndexOf), [typeof(string)])!;

private static readonly MethodInfo IndexOfMethodInfoWithStartingPosition
private static readonly MethodInfo IndexOfMethodInfoChar
= typeof(string).GetRuntimeMethod(nameof(string.IndexOf), [typeof(char)])!;

private static readonly MethodInfo IndexOfMethodInfoWithStartingPositionString
= typeof(string).GetRuntimeMethod(nameof(string.IndexOf), [typeof(string), typeof(int)])!;

private static readonly MethodInfo _replaceMethodInfo
private static readonly MethodInfo IndexOfMethodInfoWithStartingPositionChar
= typeof(string).GetRuntimeMethod(nameof(string.IndexOf), [typeof(char), typeof(int)])!;

private static readonly MethodInfo ReplaceMethodInfoString
= typeof(string).GetRuntimeMethod(nameof(string.Replace), [typeof(string), typeof(string)])!;

private static readonly MethodInfo ReplaceMethodInfoChar
= typeof(string).GetRuntimeMethod(nameof(string.Replace), [typeof(char), typeof(char)])!;

private static readonly MethodInfo _toLowerMethodInfo
= typeof(string).GetRuntimeMethod(nameof(string.ToLower), Type.EmptyTypes)!;

Expand Down Expand Up @@ -76,16 +85,36 @@ private static readonly MethodInfo _lastOrDefaultMethodInfoWithoutArgs
{
if (instance != null)
{
if (IndexOfMethodInfo.Equals(method))
if (IndexOfMethodInfoString.Equals(method) || IndexOfMethodInfoChar.Equals(method))
{
return TranslateIndexOf(instance, method, arguments[0], null);
}

if (IndexOfMethodInfoWithStartingPosition.Equals(method))
if (IndexOfMethodInfoWithStartingPositionString.Equals(method) || IndexOfMethodInfoWithStartingPositionChar.Equals(method))
{
return TranslateIndexOf(instance, method, arguments[0], arguments[1]);
}

if (ReplaceMethodInfoString.Equals(method) || ReplaceMethodInfoChar.Equals(method))
{
var firstArgument = arguments[0];
var secondArgument = arguments[1];
var stringTypeMapping =
ExpressionExtensions.InferTypeMapping(instance, firstArgument, secondArgument);

instance = _sqlExpressionFactory.ApplyTypeMapping(instance, stringTypeMapping);
firstArgument = _sqlExpressionFactory.ApplyTypeMapping(firstArgument, firstArgument.Type == typeof(char) ? CharTypeMapping.Default : stringTypeMapping);
secondArgument = _sqlExpressionFactory.ApplyTypeMapping(secondArgument, secondArgument.Type == typeof(char) ? CharTypeMapping.Default : stringTypeMapping);

return _sqlExpressionFactory.Function(
"REPLACE",
[instance, firstArgument, secondArgument],
nullable: true,
argumentsPropagateNullability: [true, true, true],
method.ReturnType,
stringTypeMapping);
}

// Jet TRIM does not take arguments.
// _trimWithNoParam is only available since .NET Core 2.0 (or .NET Standard 2.1).
if (Equals(method, _trimMethodInfoWithoutArgs) ||
Expand Down Expand Up @@ -169,26 +198,6 @@ private static readonly MethodInfo _lastOrDefaultMethodInfoWithoutArgs
method.ReturnType,
instance.TypeMapping);
}

if (_replaceMethodInfo.Equals(method))
{
var firstArgument = arguments[0];
var secondArgument = arguments[1];
var stringTypeMapping =
ExpressionExtensions.InferTypeMapping(instance, firstArgument, secondArgument);

instance = _sqlExpressionFactory.ApplyTypeMapping(instance, stringTypeMapping);
firstArgument = _sqlExpressionFactory.ApplyTypeMapping(firstArgument, stringTypeMapping);
secondArgument = _sqlExpressionFactory.ApplyTypeMapping(secondArgument, stringTypeMapping);

return _sqlExpressionFactory.Function(
"REPLACE",
[instance, firstArgument, secondArgument],
nullable: true,
argumentsPropagateNullability: [true, true, true],
method.ReturnType,
stringTypeMapping);
}
}

if (_isNullOrEmptyMethodInfo.Equals(method))
Expand Down Expand Up @@ -267,7 +276,7 @@ private SqlExpression TranslateIndexOf(
SqlExpression? startIndex)
{
var stringTypeMapping = ExpressionExtensions.InferTypeMapping(instance, searchExpression)!;
searchExpression = _sqlExpressionFactory.ApplyTypeMapping(searchExpression, stringTypeMapping);
searchExpression = _sqlExpressionFactory.ApplyTypeMapping(searchExpression, searchExpression.Type == typeof(char) ? CharTypeMapping.Default : stringTypeMapping);
instance = _sqlExpressionFactory.ApplyTypeMapping(instance, stringTypeMapping);

var charIndexArguments = new List<SqlExpression> { instance, searchExpression };
Expand Down
4 changes: 2 additions & 2 deletions src/EFCore.Jet/Query/Internal/JetLiftOrderByPostprocessor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ public virtual Expression Process(Expression expression)
relationalSplitCollectionShaperExpression.ParentIdentifier,
relationalSplitCollectionShaperExpression.ChildIdentifier, (SelectExpression)newSelect, newInner);
return relationalSplitCollectionShaperExpression;
case NonQueryExpression nonQueryExpression:
return nonQueryExpression;
case UpdateExpression or DeleteExpression:
return expression;
case SelectExpression selectExpression:
{
Dictionary<int, (int? indexcol, OrderingExpression? orderexp, bool ascend, bool rewrite, bool referstocurouter)> columnsToRewrite = [];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,11 @@ protected override Expression VisitProjection(ProjectionExpression projectionExp
return projectionExpression.Update(expression);
}

protected override Expression VisitRightJoin(RightJoinExpression rightJoinExpression)
{
throw new NotImplementedException();
}

protected override Expression VisitTableValuedFunction(TableValuedFunctionExpression tableValuedFunctionExpression)
{
var arguments = new SqlExpression[tableValuedFunctionExpression.Arguments.Count];
Expand Down
6 changes: 2 additions & 4 deletions src/EFCore.Jet/Query/Internal/JetQueryCompilationContext.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@ public class JetQueryCompilationContext(
QueryCompilationContextDependencies dependencies,
RelationalQueryCompilationContextDependencies relationalDependencies,
bool async,
bool precompiling,
IReadOnlySet<string>? nonNullableReferenceTypeParameters) : RelationalQueryCompilationContext(dependencies, relationalDependencies, async, precompiling, nonNullableReferenceTypeParameters)
bool precompiling) : RelationalQueryCompilationContext(dependencies, relationalDependencies, async, precompiling)
{
/// <summary>
/// This is an internal API that supports the Entity Framework Core infrastructure and not subject to
Expand All @@ -30,8 +29,7 @@ public JetQueryCompilationContext(
RelationalQueryCompilationContextDependencies relationalDependencies,
bool async)
: this(
dependencies, relationalDependencies, async, precompiling: false,
nonNullableReferenceTypeParameters: null)
dependencies, relationalDependencies, async, precompiling: false)
{
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,7 @@ public virtual QueryCompilationContext Create(bool async)
/// any release. You should only use it directly in your code with extreme caution and knowing that
/// doing so can result in application failures when updating to a new Entity Framework Core release.
/// </summary>
public virtual QueryCompilationContext CreatePrecompiled(bool async, IReadOnlySet<string> nonNullableReferenceTypeParameters)
public virtual QueryCompilationContext CreatePrecompiled(bool async)
=> new JetQueryCompilationContext(
Dependencies, RelationalDependencies, async, precompiling: true,
nonNullableReferenceTypeParameters);
Dependencies, RelationalDependencies, async, precompiling: true);
}
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@ private sealed class SkipWithoutOrderByInSplitQueryVerifier : ExpressionVisitor
case SelectExpression { Offset: not null, Orderings.Count: 0 }:
throw new InvalidOperationException(JetStrings.SplitQueryOffsetWithoutOrderBy);

case NonQueryExpression nonQueryExpression:
return nonQueryExpression;
case UpdateExpression or DeleteExpression:
return expression;

default:
return base.Visit(expression);
Expand Down
Loading