Table of Contents

Class PgUnknownBinaryExpression

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

A binary expression only to be used by plugins, since new expressions can only be added (and handled) within the provider itself. Allows defining the operator as a string within the expression, and has default (i.e. propagating) nullability semantics. All type mappings must be applied to the operands before the expression is constructed, since there's no inference logic for it in NpgsqlSqlExpressionFactory.

public class PgUnknownBinaryExpression : SqlExpression, IRelationalQuotableExpression, IPrintableExpression, IEquatable<PgUnknownBinaryExpression>
Inheritance
PgUnknownBinaryExpression
Implements
Inherited Members

Constructors

PgUnknownBinaryExpression(SqlExpression, SqlExpression, string, Type, RelationalTypeMapping?)

public PgUnknownBinaryExpression(SqlExpression left, SqlExpression right, string binaryOperator, Type type, RelationalTypeMapping? typeMapping = null)

Parameters

left SqlExpression

The left-hand expression.

right SqlExpression

The right-hand expression.

binaryOperator string

The operator symbol acting on the expression.

type Type

The result type.

typeMapping RelationalTypeMapping

The type mapping for the expression.

Exceptions

ArgumentNullException

Properties

Left

The left-hand expression.

public virtual SqlExpression Left { get; }

Property Value

SqlExpression

Operator

The operator.

public virtual string Operator { get; }

Property Value

string

Right

The right-hand expression.

public virtual SqlExpression Right { get; }

Property Value

SqlExpression

Methods

Equals(PgUnknownBinaryExpression?)

Indicates whether the current object is equal to another object of the same type.

public virtual bool Equals(PgUnknownBinaryExpression? other)

Parameters

other PgUnknownBinaryExpression

An object to compare with this object.

Returns

bool

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

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

ToString()

Returns a textual representation of the Expression.

public override string ToString()

Returns

string

A textual representation of the Expression.

Update(SqlExpression, 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 PgUnknownBinaryExpression Update(SqlExpression left, SqlExpression right)

Parameters

left SqlExpression
right SqlExpression

Returns

PgUnknownBinaryExpression

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.