-
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.
Part of #795
- Loading branch information
Showing
56 changed files
with
3,221 additions
and
63 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
64 changes: 64 additions & 0 deletions
64
src/EFCore.Relational/Properties/RelationalStrings.Designer.cs
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
// Licensed to the .NET Foundation under one or more agreements. | ||
// The .NET Foundation licenses this file to you under the MIT license. | ||
|
||
using Microsoft.EntityFrameworkCore.Query.SqlExpressions; | ||
|
||
namespace Microsoft.EntityFrameworkCore.Query; | ||
|
||
#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member | ||
public class NonQueryExpression : Expression, IPrintableExpression | ||
{ | ||
public NonQueryExpression(DeleteExpression deleteExpression) | ||
{ | ||
DeleteExpression = deleteExpression; | ||
} | ||
|
||
public virtual DeleteExpression DeleteExpression { get; } | ||
|
||
/// <inheritdoc /> | ||
public override Type Type => typeof(int); | ||
|
||
/// <inheritdoc /> | ||
public sealed override ExpressionType NodeType => ExpressionType.Extension; | ||
|
||
protected override Expression VisitChildren(ExpressionVisitor visitor) | ||
{ | ||
var deleteExpression = (DeleteExpression)visitor.Visit(DeleteExpression); | ||
|
||
return Update(deleteExpression); | ||
} | ||
|
||
public virtual NonQueryExpression Update(DeleteExpression deleteExpression) | ||
=> deleteExpression != DeleteExpression | ||
? new NonQueryExpression(deleteExpression) | ||
: this; | ||
|
||
/// <inheritdoc /> | ||
public virtual void Print(ExpressionPrinter expressionPrinter) | ||
{ | ||
expressionPrinter.Append($"({nameof(NonQueryExpression)}: "); | ||
expressionPrinter.Visit(DeleteExpression); | ||
} | ||
|
||
/// <inheritdoc /> | ||
public override bool Equals(object? obj) | ||
=> obj != null | ||
&& (ReferenceEquals(this, obj) | ||
|| obj is NonQueryExpression nonQueryExpression | ||
&& Equals(nonQueryExpression)); | ||
|
||
private bool Equals(NonQueryExpression nonQueryExpression) | ||
=> DeleteExpression == nonQueryExpression.DeleteExpression; | ||
|
||
/// <inheritdoc /> | ||
public override int GetHashCode() => DeleteExpression.GetHashCode(); | ||
} |
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.