Class PgDeleteExpression
- Assembly
- Npgsql.EntityFrameworkCore.PostgreSQL.dll
An SQL expression that represents a PostgreSQL DELETE operation.
public sealed class PgDeleteExpression : Expression, IPrintableExpression
- Inheritance
-
PgDeleteExpression
- Implements
- Inherited Members
Constructors
PgDeleteExpression(TableExpression, IReadOnlyList<TableExpressionBase>, SqlExpression?, ISet<string>)
Creates a new instance of the PgDeleteExpression class.
public PgDeleteExpression(TableExpression table, IReadOnlyList<TableExpressionBase> fromItems, SqlExpression? predicate, ISet<string> tags)
Parameters
table
TableExpressionfromItems
IReadOnlyList<TableExpressionBase>predicate
SqlExpressiontags
ISet<string>
Properties
FromItems
Additional tables which can be referenced in the predicate.
public IReadOnlyList<TableExpressionBase> FromItems { get; }
Property Value
NodeType
Gets the node type of this Expression.
public override ExpressionType NodeType { get; }
Property Value
- ExpressionType
One of the ExpressionType values.
Predicate
The WHERE predicate for the DELETE.
public SqlExpression? Predicate { get; }
Property Value
Table
The tables that rows are to be deleted from.
public TableExpression Table { get; }
Property Value
Tags
The list of tags applied to this DeleteExpression.
public ISet<string> Tags { get; }
Property Value
Type
Gets the static type of the expression that this Expression represents.
public override Type Type { get; }
Property Value
Methods
Equals(object?)
Determines whether the specified object is equal to the current object.
public override bool Equals(object? obj)
Parameters
obj
objectThe object to compare with the current object.
Returns
GetHashCode()
Serves as the default hash function.
public override int GetHashCode()
Returns
- int
A hash code for the current object.
Print(ExpressionPrinter)
Creates a printable string representation of the given expression using ExpressionPrinter.
public void Print(ExpressionPrinter expressionPrinter)
Parameters
expressionPrinter
ExpressionPrinterThe expression printer to use.
Update(SqlExpression?)
Creates a new expression that is like this one, but using the supplied children. If all of the children are the same, it will return this expression.
public PgDeleteExpression Update(SqlExpression? predicate)
Parameters
predicate
SqlExpressionThe Predicate property of the result.
Returns
VisitChildren(ExpressionVisitor)
Reduces the node and then calls the visitor delegate on the reduced expression. The method throws an exception if the node is not reducible.
protected override Expression VisitChildren(ExpressionVisitor visitor)
Parameters
visitor
ExpressionVisitorAn instance of Func<T, TResult>.
Returns
- Expression
The expression being visited, or an expression which should replace it in the tree.