Search Results for

    Show / Hide Table of Contents

    Class PostgresFunctionExpression

    Represents a SQL function call expression, supporting PostgreSQL's named parameter notation (e.g. make_interval(weeks => 2) and non-comma parameter separators (e.g. position(substring in string)).

    Inheritance
    object
    PostgresFunctionExpression
    Implements
    IEquatable<><PostgresFunctionExpression>
    Namespace: Npgsql.EntityFrameworkCore.PostgreSQL.Query.Expressions.Internal
    Assembly: Npgsql.EntityFrameworkCore.PostgreSQL.dll
    Syntax
    public class PostgresFunctionExpression : SqlFunctionExpression, IEquatable<PostgresFunctionExpression>

    Constructors

    | Improve this Doc View Source

    PostgresFunctionExpression(string, IEnumerable<SqlExpression>, IEnumerable<string?>?, IEnumerable<string?>?, bool, SqlExpression?, IReadOnlyList<OrderingExpression>, bool, IEnumerable<bool>, Type, RelationalTypeMapping?)

    Creates a new instance of PostgresFunctionExpression.

    Declaration
    public PostgresFunctionExpression(string name, IEnumerable<SqlExpression> arguments, IEnumerable<string?>? argumentNames, IEnumerable<string?>? argumentSeparators, bool aggregateDistinct, SqlExpression? aggregatePredicate, IReadOnlyList<OrderingExpression> aggregateOrderings, bool nullable, IEnumerable<bool> argumentsPropagateNullability, Type type, RelationalTypeMapping? typeMapping)
    Parameters
    Type Name Description
    string name
    IEnumerable<><SqlExpression> arguments
    IEnumerable<><string?>? argumentNames
    IEnumerable<><string?>? argumentSeparators
    bool aggregateDistinct
    SqlExpression? aggregatePredicate
    IReadOnlyList<><OrderingExpression> aggregateOrderings
    bool nullable
    IEnumerable<><bool> argumentsPropagateNullability
    Type type
    RelationalTypeMapping? typeMapping

    Properties

    | Improve this Doc View Source

    AggregateOrderings

    For aggregate methods, contains the orderings to be applied.

    Declaration
    public virtual IReadOnlyList<OrderingExpression> AggregateOrderings { get; }
    Property Value
    Type Description
    IReadOnlyList<><OrderingExpression>
    | Improve this Doc View Source

    AggregatePredicate

    For aggregate methods, contains the predicate to be applied (generated as the SQL FILTER clause).

    Declaration
    public virtual SqlExpression? AggregatePredicate { get; }
    Property Value
    Type Description
    SqlExpression?
    | Improve this Doc View Source

    ArgumentNames

    List of argument names, corresponding position-wise to arguments in . Unnamed (positional) arguments must come first, so this list must contain possible nulls, followed by non-nulls.

    Declaration
    public virtual IReadOnlyList<string?> ArgumentNames { get; }
    Property Value
    Type Description
    IReadOnlyList<><string?>
    | Improve this Doc View Source

    Arguments

    Declaration
    public virtual IReadOnlyList<SqlExpression> Arguments { get; }
    Property Value
    Type Description
    IReadOnlyList<><SqlExpression>
    | Improve this Doc View Source

    ArgumentSeparators

    List of non-comma separators between argument separators, in the order in which they appear between the arguments. null as well as positions beyond the end of the list mean regular commas.

    Declaration
    public virtual IReadOnlyList<string?> ArgumentSeparators { get; }
    Property Value
    Type Description
    IReadOnlyList<><string?>
    | Improve this Doc View Source

    ArgumentsPropagateNullability

    Declaration
    public virtual IReadOnlyList<bool> ArgumentsPropagateNullability { get; }
    Property Value
    Type Description
    IReadOnlyList<><bool>
    | Improve this Doc View Source

    IsAggregateDistinct

    For aggregate methods, contains whether to apply distinct.

    Declaration
    public virtual bool IsAggregateDistinct { get; }
    Property Value
    Type Description
    bool

    Methods

    | Improve this Doc View Source

    ApplyTypeMapping(RelationalTypeMapping?)

    Declaration
    public override SqlFunctionExpression ApplyTypeMapping(RelationalTypeMapping? typeMapping)
    Parameters
    Type Name Description
    RelationalTypeMapping? typeMapping
    Returns
    Type Description
    SqlFunctionExpression
    | Improve this Doc View Source

    CreateWithArgumentSeparators(string, IEnumerable<SqlExpression>, IEnumerable<string?>, bool, IEnumerable<bool>, bool, Type, RelationalTypeMapping?)

    Creates an instance of PostgresFunctionExpression with argument separators.

    Declaration
    public static PostgresFunctionExpression CreateWithArgumentSeparators(string name, IEnumerable<SqlExpression> arguments, IEnumerable<string?> argumentSeparators, bool nullable, IEnumerable<bool> argumentsPropagateNullability, bool builtIn, Type type, RelationalTypeMapping? typeMapping)
    Parameters
    Type Name Description
    string name
    IEnumerable<><SqlExpression> arguments
    IEnumerable<><string?> argumentSeparators
    bool nullable
    IEnumerable<><bool> argumentsPropagateNullability
    bool builtIn
    Type type
    RelationalTypeMapping? typeMapping
    Returns
    Type Description
    PostgresFunctionExpression
    | Improve this Doc View Source

    CreateWithNamedArguments(string, IEnumerable<SqlExpression>, IEnumerable<string?>, bool, IEnumerable<bool>, bool, Type, RelationalTypeMapping?)

    Creates an instance of PostgresFunctionExpression with named arguments.

    Declaration
    public static PostgresFunctionExpression CreateWithNamedArguments(string name, IEnumerable<SqlExpression> arguments, IEnumerable<string?> argumentNames, bool nullable, IEnumerable<bool> argumentsPropagateNullability, bool builtIn, Type type, RelationalTypeMapping? typeMapping)
    Parameters
    Type Name Description
    string name
    IEnumerable<><SqlExpression> arguments
    IEnumerable<><string?> argumentNames
    bool nullable
    IEnumerable<><bool> argumentsPropagateNullability
    bool builtIn
    Type type
    RelationalTypeMapping? typeMapping
    Returns
    Type Description
    PostgresFunctionExpression
    | Improve this Doc View Source

    Equals(PostgresFunctionExpression?)

    Declaration
    public virtual bool Equals(PostgresFunctionExpression? other)
    Parameters
    Type Name Description
    PostgresFunctionExpression other
    Returns
    Type Description
    bool
    | Improve this Doc View Source

    Equals(object?)

    Declaration
    public override bool Equals(object? obj)
    Parameters
    Type Name Description
    object? obj
    Returns
    Type Description
    bool
    | Improve this Doc View Source

    GetHashCode()

    Declaration
    public override int GetHashCode()
    Returns
    Type Description
    int
    | Improve this Doc View Source

    Print(ExpressionPrinter)

    Declaration
    protected override void Print(ExpressionPrinter expressionPrinter)
    Parameters
    Type Name Description
    ExpressionPrinter expressionPrinter
    | Improve this Doc View Source

    Update(SqlExpression?, IReadOnlyList<SqlExpression>?)

    Declaration
    public override SqlFunctionExpression Update(SqlExpression? instance, IReadOnlyList<SqlExpression>? arguments)
    Parameters
    Type Name Description
    SqlExpression? instance
    IReadOnlyList<><SqlExpression>? arguments
    Returns
    Type Description
    SqlFunctionExpression
    | Improve this Doc View Source

    UpdateAggregateComponents(SqlExpression?, IReadOnlyList<OrderingExpression>)

    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.

    Declaration
    public virtual PostgresFunctionExpression UpdateAggregateComponents(SqlExpression? predicate, IReadOnlyList<OrderingExpression> orderings)
    Parameters
    Type Name Description
    SqlExpression? predicate
    IReadOnlyList<><OrderingExpression> orderings
    Returns
    Type Description
    PostgresFunctionExpression
    | Improve this Doc View Source

    VisitChildren(ExpressionVisitor)

    Declaration
    protected override Expression VisitChildren(ExpressionVisitor visitor)
    Parameters
    Type Name Description
    ExpressionVisitor visitor
    Returns
    Type Description
    Expression

    Implements

    IEquatable<>
    • Improve this Doc
    • View Source
    In This Article
    Back to top © Copyright 2023 The Npgsql Development Team