Table of Contents

Class PgTableValuedFunctionExpression

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

An expression that represents a PostgreSQL unnest function call in a SQL tree.

public class PgTableValuedFunctionExpression : TableValuedFunctionExpression, IRelationalQuotableExpression, IPrintableExpression, ITableBasedExpression, IEquatable<PgTableValuedFunctionExpression>
Inheritance
PgTableValuedFunctionExpression
Implements
Derived
Inherited Members

Remarks

This expression is just a TableValuedFunctionExpression, adding the ability to provide an explicit column name for its output (SELECT * FROM unnest(array) AS f(foo)). This is necessary since when the column name isn't explicitly specified, it is automatically identical to the table alias (f above); since the table alias may get uniquified by EF, this would break queries.

See unnest for more information and examples.

This is an internal API that supports the Entity Framework Core infrastructure and not subject to the same compatibility standards as public APIs. It may be changed or removed without notice in any release. You should only use it directly in your code with extreme caution and knowing that doing so can result in application failures when updating to a new Entity Framework Core release.

Constructors

PgTableValuedFunctionExpression(string, string, IReadOnlyList<SqlExpression>, IReadOnlyList<ColumnInfo>?, bool)

This is an internal API that supports the Entity Framework Core infrastructure and not subject to the same compatibility standards as public APIs. It may be changed or removed without notice in any release. You should only use it directly in your code with extreme caution and knowing that doing so can result in application failures when updating to a new Entity Framework Core release.

public PgTableValuedFunctionExpression(string alias, string name, IReadOnlyList<SqlExpression> arguments, IReadOnlyList<PgTableValuedFunctionExpression.ColumnInfo>? columnInfos, bool withOrdinality = true)

Parameters

alias string
name string
arguments IReadOnlyList<SqlExpression>
columnInfos IReadOnlyList<PgTableValuedFunctionExpression.ColumnInfo>
withOrdinality bool

Properties

ColumnInfos

The name of the column to be projected out from the unnest call.

public virtual IReadOnlyList<PgTableValuedFunctionExpression.ColumnInfo>? ColumnInfos { get; }

Property Value

IReadOnlyList<PgTableValuedFunctionExpression.ColumnInfo>

Remarks

This is an internal API that supports the Entity Framework Core infrastructure and not subject to the same compatibility standards as public APIs. It may be changed or removed without notice in any release. You should only use it directly in your code with extreme caution and knowing that doing so can result in application failures when updating to a new Entity Framework Core release.

WithOrdinality

Whether to project an additional ordinality column containing the index of each element in the array.

public virtual bool WithOrdinality { get; }

Property Value

bool

Remarks

This is an internal API that supports the Entity Framework Core infrastructure and not subject to the same compatibility standards as public APIs. It may be changed or removed without notice in any release. You should only use it directly in your code with extreme caution and knowing that doing so can result in application failures when updating to a new Entity Framework Core release.

Methods

Clone(string?, ExpressionVisitor)

Creates a new object that is a copy of the current instance.

public override TableExpressionBase Clone(string? alias, ExpressionVisitor cloningExpressionVisitor)

Parameters

alias string

The alias to be used by the cloned table.

cloningExpressionVisitor ExpressionVisitor

The cloning expression for further visitation of nested nodes.

Returns

TableExpressionBase

A new object that is a copy of this instance.

Equals(PgTableValuedFunctionExpression?)

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

public bool Equals(PgTableValuedFunctionExpression? expression)

Parameters

expression PgTableValuedFunctionExpression

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.

Update(IReadOnlyList<SqlExpression>)

This is an internal API that supports the Entity Framework Core infrastructure and not subject to the same compatibility standards as public APIs. It may be changed or removed without notice in any release. You should only use it directly in your code with extreme caution and knowing that doing so can result in application failures when updating to a new Entity Framework Core release.

public override PgTableValuedFunctionExpression Update(IReadOnlyList<SqlExpression> arguments)

Parameters

arguments IReadOnlyList<SqlExpression>

Returns

PgTableValuedFunctionExpression

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.

WithAlias(string)

Returns a copy of the current TableExpressionBase with the new provided alias.

public override PgTableValuedFunctionExpression WithAlias(string newAlias)

Parameters

newAlias string

The alias to apply to the returned TableExpressionBase.

Returns

PgTableValuedFunctionExpression

WithColumnInfos(IReadOnlyList<ColumnInfo>)

This is an internal API that supports the Entity Framework Core infrastructure and not subject to the same compatibility standards as public APIs. It may be changed or removed without notice in any release. You should only use it directly in your code with extreme caution and knowing that doing so can result in application failures when updating to a new Entity Framework Core release.

public virtual PgTableValuedFunctionExpression WithColumnInfos(IReadOnlyList<PgTableValuedFunctionExpression.ColumnInfo> columnInfos)

Parameters

columnInfos IReadOnlyList<PgTableValuedFunctionExpression.ColumnInfo>

Returns

PgTableValuedFunctionExpression