Class PgTableValuedFunctionExpression
- 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
stringname
stringarguments
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
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
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
stringThe alias to be used by the cloned table.
cloningExpressionVisitor
ExpressionVisitorThe 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
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.
protected override void Print(ExpressionPrinter expressionPrinter)
Parameters
expressionPrinter
ExpressionPrinterThe 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
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.
WithAlias(string)
Returns a copy of the current TableExpressionBase with the new provided alias.
public override PgTableValuedFunctionExpression WithAlias(string newAlias)
Parameters
newAlias
stringThe alias to apply to the returned TableExpressionBase.
Returns
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>