-
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.
Add dependency objects for query services
Fixes #16788
- Loading branch information
1 parent
b719b02
commit 43b1eca
Showing
64 changed files
with
1,305 additions
and
357 deletions.
There are no files selected for viewing
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
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
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
11 changes: 10 additions & 1 deletion
11
...ore.InMemory/Query/Internal/InMemoryQueryableMethodTranslatingExpressionVisitorFactory.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 |
---|---|---|
@@ -1,14 +1,23 @@ | ||
// 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 JetBrains.Annotations; | ||
using Microsoft.EntityFrameworkCore.Metadata; | ||
using Microsoft.EntityFrameworkCore.Query; | ||
|
||
namespace Microsoft.EntityFrameworkCore.InMemory.Query.Internal | ||
{ | ||
public class InMemoryQueryableMethodTranslatingExpressionVisitorFactory : IQueryableMethodTranslatingExpressionVisitorFactory | ||
{ | ||
private readonly QueryableMethodTranslatingExpressionVisitorDependencies _dependencies; | ||
|
||
public InMemoryQueryableMethodTranslatingExpressionVisitorFactory( | ||
[NotNull] QueryableMethodTranslatingExpressionVisitorDependencies dependencies) | ||
{ | ||
_dependencies = dependencies; | ||
} | ||
|
||
public virtual QueryableMethodTranslatingExpressionVisitor Create(IModel model) | ||
=> new InMemoryQueryableMethodTranslatingExpressionVisitor(model); | ||
=> new InMemoryQueryableMethodTranslatingExpressionVisitor(_dependencies, model); | ||
} | ||
} |
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
13 changes: 4 additions & 9 deletions
13
src/EFCore.InMemory/Query/Internal/InMemoryShapedQueryExpressionVisitorFactory.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 |
---|---|---|
@@ -1,26 +1,21 @@ | ||
// 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 Microsoft.EntityFrameworkCore.Metadata; | ||
using Microsoft.EntityFrameworkCore.Query; | ||
|
||
namespace Microsoft.EntityFrameworkCore.InMemory.Query.Internal | ||
{ | ||
public class InMemoryShapedQueryCompilingExpressionVisitorFactory : IShapedQueryCompilingExpressionVisitorFactory | ||
{ | ||
private readonly IEntityMaterializerSource _entityMaterializerSource; | ||
private readonly ShapedQueryCompilingExpressionVisitorDependencies _dependencies; | ||
|
||
public InMemoryShapedQueryCompilingExpressionVisitorFactory(IEntityMaterializerSource entityMaterializerSource) | ||
public InMemoryShapedQueryCompilingExpressionVisitorFactory(ShapedQueryCompilingExpressionVisitorDependencies dependencies) | ||
{ | ||
_entityMaterializerSource = entityMaterializerSource; | ||
_dependencies = dependencies; | ||
} | ||
|
||
public virtual ShapedQueryCompilingExpressionVisitor Create(QueryCompilationContext queryCompilationContext) | ||
{ | ||
return new InMemoryShapedQueryCompilingExpressionVisitor( | ||
queryCompilationContext, | ||
_entityMaterializerSource); | ||
} | ||
=> new InMemoryShapedQueryCompilingExpressionVisitor(queryCompilationContext, _dependencies); | ||
} | ||
|
||
} |
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
22 changes: 22 additions & 0 deletions
22
src/EFCore.InMemory/ValueGeneration/Internal/IInMemoryIntegerValueGenerator.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,22 @@ | ||
// 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. | ||
|
||
namespace Microsoft.EntityFrameworkCore.InMemory.ValueGeneration.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 interface IInMemoryIntegerValueGenerator | ||
{ | ||
/// <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> | ||
void Bump(object[] row); | ||
} | ||
} |
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
18 changes: 4 additions & 14 deletions
18
src/EFCore.Relational/Query/Internal/QuerySqlGeneratorFactory.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 |
---|---|---|
@@ -1,28 +1,18 @@ | ||
// 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 Microsoft.EntityFrameworkCore.Storage; | ||
|
||
namespace Microsoft.EntityFrameworkCore.Query.Internal | ||
{ | ||
public class QuerySqlGeneratorFactory : IQuerySqlGeneratorFactory | ||
{ | ||
private readonly IRelationalCommandBuilderFactory _commandBuilderFactory; | ||
private readonly ISqlGenerationHelper _sqlGenerationHelper; | ||
private readonly SqlExpressionVisitorDependencies _dependencies; | ||
|
||
public QuerySqlGeneratorFactory( | ||
IRelationalCommandBuilderFactory commandBuilderFactory, | ||
ISqlGenerationHelper sqlGenerationHelper) | ||
public QuerySqlGeneratorFactory(SqlExpressionVisitorDependencies dependencies) | ||
{ | ||
_commandBuilderFactory = commandBuilderFactory; | ||
_sqlGenerationHelper = sqlGenerationHelper; | ||
_dependencies = dependencies; | ||
} | ||
|
||
public virtual QuerySqlGenerator Create() | ||
{ | ||
return new QuerySqlGenerator( | ||
_commandBuilderFactory, | ||
_sqlGenerationHelper); | ||
} | ||
=> new QuerySqlGenerator(_dependencies); | ||
} | ||
} |
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.