-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
91 changed files
with
2,411 additions
and
718 deletions.
There are no files selected for viewing
43 changes: 0 additions & 43 deletions
43
src/EFCore.Cosmos/Query/CosmosQueryTranslationPostprocessor.cs
This file was deleted.
Oops, something went wrong.
52 changes: 52 additions & 0 deletions
52
src/EFCore.Cosmos/Query/Internal/CosmosQueryTranslationPostprocessor.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
// Copyright (c) .NET Foundation. All rights reserved. | ||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. | ||
|
||
using System.Linq.Expressions; | ||
using JetBrains.Annotations; | ||
using Microsoft.EntityFrameworkCore.Query; | ||
using Microsoft.EntityFrameworkCore.Utilities; | ||
|
||
namespace Microsoft.EntityFrameworkCore.Cosmos.Query.Internal | ||
{ | ||
/// <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> | ||
public class CosmosQueryTranslationPostprocessor : QueryTranslationPostprocessor | ||
{ | ||
private readonly ISqlExpressionFactory _sqlExpressionFactory; | ||
|
||
/// <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> | ||
public CosmosQueryTranslationPostprocessor( | ||
[NotNull] QueryTranslationPostprocessorDependencies dependencies, | ||
[NotNull] ISqlExpressionFactory sqlExpressionFactory, | ||
[NotNull] QueryCompilationContext queryCompilationContext) | ||
: base(dependencies, queryCompilationContext) | ||
{ | ||
Check.NotNull(sqlExpressionFactory, nameof(sqlExpressionFactory)); | ||
|
||
_sqlExpressionFactory = sqlExpressionFactory; | ||
} | ||
|
||
/// <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> | ||
public override Expression Process(Expression query) | ||
{ | ||
query = base.Process(query); | ||
query = new CosmosValueConverterCompensatingExpressionVisitor(_sqlExpressionFactory).Visit(query); | ||
|
||
return query; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.