Table of Contents

Class PgDeleteExpression

Namespace
Npgsql.EntityFrameworkCore.PostgreSQL.Query.Expressions.Internal
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 TableExpression
fromItems IReadOnlyList<TableExpressionBase>
predicate SqlExpression
tags ISet<string>

Properties

FromItems

Additional tables which can be referenced in the predicate.

public IReadOnlyList<TableExpressionBase> FromItems { get; }

Property Value

IReadOnlyList<TableExpressionBase>

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

SqlExpression

Table

The tables that rows are to be deleted from.

public TableExpression Table { get; }

Property Value

TableExpression

Tags

The list of tags applied to this DeleteExpression.

public ISet<string> Tags { get; }

Property Value

ISet<string>

Type

Gets the static type of the expression that this Expression represents.

public override Type Type { get; }

Property Value

Type

The Type that represents the static type of the expression.

Methods

Equals(object?)

Determines whether the specified object is equal to the current object.

public override bool Equals(object? obj)

Parameters

obj object

The object to compare with the current object.

Returns

bool

true if the specified object is equal to the current object; otherwise, false.

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 ExpressionPrinter

The 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 SqlExpression

The Predicate property of the result.

Returns

PgDeleteExpression

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 ExpressionVisitor

An instance of Func<T, TResult>.

Returns

Expression

The expression being visited, or an expression which should replace it in the tree.