Table of Contents

Class PgNewArrayExpression

Namespace
Npgsql.EntityFrameworkCore.PostgreSQL.Query.Expressions.Internal
Assembly
Npgsql.EntityFrameworkCore.PostgreSQL.dll

Represents creating a new PostgreSQL array.

public class PgNewArrayExpression : SqlExpression, IRelationalQuotableExpression, IPrintableExpression
Inheritance
PgNewArrayExpression
Implements
Inherited Members

Constructors

PgNewArrayExpression(IReadOnlyList<SqlExpression>, Type, RelationalTypeMapping?)

Creates a new instance of the PgNewArrayExpression class.

public PgNewArrayExpression(IReadOnlyList<SqlExpression> expressions, Type type, RelationalTypeMapping? typeMapping)

Parameters

expressions IReadOnlyList<SqlExpression>

The values to initialize the elements of the new array.

type Type

The Type of the expression.

typeMapping RelationalTypeMapping

The RelationalTypeMapping associated with the expression.

Properties

Expressions

The operator of this PostgreSQL binary operation.

public virtual IReadOnlyList<SqlExpression> Expressions { get; }

Property Value

IReadOnlyList<SqlExpression>

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.

protected override void Print(ExpressionPrinter expressionPrinter)

Parameters

expressionPrinter ExpressionPrinter

The expression printer to use.

Quote()

Quotes the expression; that is, returns an expression that, when evaluated, would construct an expression identical to this one. Used to generate code for precompiled queries, which reconstructs this expression.

public override Expression Quote()

Returns

Expression

Update(IReadOnlyList<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 virtual PgNewArrayExpression Update(IReadOnlyList<SqlExpression> expressions)

Parameters

expressions IReadOnlyList<SqlExpression>

The values to initialize the elements of the new array.

Returns

PgNewArrayExpression

This expression if no children changed, or an expression with the updated children.

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.