Skip to content

InMemory: No-op for AsSplitQuery operator (#22098) #22107

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Merged
1 commit merged into from
Aug 18, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
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 @@ -71,6 +71,25 @@ protected InMemoryQueryableMethodTranslatingExpressionVisitor(
protected override QueryableMethodTranslatingExpressionVisitor CreateSubqueryVisitor()
=> new InMemoryQueryableMethodTranslatingExpressionVisitor(this);

/// <summary>
/// This is an internal API that supports the Entity Framework Core infrastructure and not subject to
/// the same compatibility standards as public APIs. It may be changed or removed without notice in
/// 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>
protected override Expression VisitMethodCall(MethodCallExpression methodCallExpression)
{
if (methodCallExpression.Method.IsGenericMethod
&& methodCallExpression.Arguments.Count == 1
&& methodCallExpression.Arguments[0].Type.TryGetSequenceType() != null
&& string.Equals(methodCallExpression.Method.Name, "AsSplitQuery", StringComparison.Ordinal))
{
return Visit(methodCallExpression.Arguments[0]);
}

return base.VisitMethodCall(methodCallExpression);
}

/// <summary>
/// This is an internal API that supports the Entity Framework Core infrastructure and not subject to
/// the same compatibility standards as public APIs. It may be changed or removed without notice in
Expand Down
8 changes: 0 additions & 8 deletions src/EFCore/Properties/CoreStrings.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 0 additions & 3 deletions src/EFCore/Properties/CoreStrings.resx
Original file line number Diff line number Diff line change
Expand Up @@ -1322,9 +1322,6 @@
<data name="IncludeWithCycle" xml:space="preserve">
<value>The Include path '{navigationName}-&gt;{inverseNavigationName}' results in a cycle. Cycles are not allowed in no-tracking queries. Either use a tracking query or remove the cycle.</value>
</data>
<data name="UnhandledMethod" xml:space="preserve">
<value>Unhandled method '{methodName}'.</value>
</data>
<data name="RuntimeParameterMissingParameter" xml:space="preserve">
<value>Runtime parameter extraction lambda must have one QueryContext parameter.</value>
</data>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -493,7 +493,7 @@ LambdaExpression GetLambdaExpressionFromArgument(int argumentIndex) =>

return _subquery
? (Expression)null
: throw new NotImplementedException(CoreStrings.UnhandledMethod(method.Name));
: throw new InvalidOperationException(CoreStrings.TranslationFailed(methodCallExpression.Print()));
}

private sealed class EntityShaperNullableMarkingExpressionVisitor : ExpressionVisitor
Expand Down