Search Results for

    Show / Hide Table of Contents

    Class NpgsqlSqlExpressionFactory

    Inheritance
    object
    NpgsqlSqlExpressionFactory
    Namespace: Npgsql.EntityFrameworkCore.PostgreSQL.Query
    Assembly: Npgsql.EntityFrameworkCore.PostgreSQL.dll
    Syntax
    public class NpgsqlSqlExpressionFactory : SqlExpressionFactory

    Constructors

    | Improve this Doc View Source

    NpgsqlSqlExpressionFactory(SqlExpressionFactoryDependencies)

    Creates a new instance of the NpgsqlSqlExpressionFactory class.

    Declaration
    public NpgsqlSqlExpressionFactory(SqlExpressionFactoryDependencies dependencies)
    Parameters
    Type Name Description
    SqlExpressionFactoryDependencies dependencies

    Parameter object containing dependencies for this class.

    Methods

    | Improve this Doc View Source

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

    Creates a new PostgresFunctionExpression for a PostgreSQL aggregate function call..

    Declaration
    public virtual PostgresFunctionExpression AggregateFunction(string name, IEnumerable<SqlExpression> arguments, EnumerableExpression aggregateEnumerableExpression, bool nullable, IEnumerable<bool> argumentsPropagateNullability, Type returnType, RelationalTypeMapping? typeMapping = null)
    Parameters
    Type Name Description
    string name
    IEnumerable<><SqlExpression> arguments
    EnumerableExpression aggregateEnumerableExpression
    bool nullable
    IEnumerable<><bool> argumentsPropagateNullability
    Type returnType
    RelationalTypeMapping? typeMapping
    Returns
    Type Description
    PostgresFunctionExpression
    | Improve this Doc View Source

    All(SqlExpression, SqlExpression, PostgresAllOperatorType)

    Creates a new PostgresAllExpression, corresponding to the PostgreSQL-specific LIKE ALL operator.

    Declaration
    public virtual PostgresAllExpression All(SqlExpression item, SqlExpression array, PostgresAllOperatorType operatorType)
    Parameters
    Type Name Description
    SqlExpression item
    SqlExpression array
    PostgresAllOperatorType operatorType
    Returns
    Type Description
    PostgresAllExpression
    | Improve this Doc View Source

    Any(SqlExpression, SqlExpression, PostgresAnyOperatorType)

    Creates a new PostgresAnyExpression, corresponding to the PostgreSQL-specific = ANY operator.

    Declaration
    public virtual PostgresAnyExpression Any(SqlExpression item, SqlExpression array, PostgresAnyOperatorType operatorType)
    Parameters
    Type Name Description
    SqlExpression item
    SqlExpression array
    PostgresAnyOperatorType operatorType
    Returns
    Type Description
    PostgresAnyExpression
    | Improve this Doc View Source

    ApplyTypeMapping(SqlExpression?, RelationalTypeMapping?)

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

    ArrayIndex(SqlExpression, SqlExpression, RelationalTypeMapping?)

    Creates a new PostgresArrayIndexExpression, corresponding to the PostgreSQL-specific array subscripting operator.

    Declaration
    public virtual PostgresArrayIndexExpression ArrayIndex(SqlExpression array, SqlExpression index, RelationalTypeMapping? typeMapping = null)
    Parameters
    Type Name Description
    SqlExpression array
    SqlExpression index
    RelationalTypeMapping? typeMapping
    Returns
    Type Description
    PostgresArrayIndexExpression
    | Improve this Doc View Source

    AtTimeZone(SqlExpression, SqlExpression, Type, RelationalTypeMapping?)

    Creates a new , for converting a timestamp to another time zone.

    Declaration
    public virtual AtTimeZoneExpression AtTimeZone(SqlExpression timestamp, SqlExpression timeZone, Type type, RelationalTypeMapping? typeMapping = null)
    Parameters
    Type Name Description
    SqlExpression timestamp
    SqlExpression timeZone
    Type type
    RelationalTypeMapping? typeMapping
    Returns
    Type Description
    AtTimeZoneExpression
    | Improve this Doc View Source

    AtUtc(SqlExpression, RelationalTypeMapping?)

    Creates a new , for converting a timestamp to UTC.

    Declaration
    public virtual AtTimeZoneExpression AtUtc(SqlExpression timestamp, RelationalTypeMapping? typeMapping = null)
    Parameters
    Type Name Description
    SqlExpression timestamp
    RelationalTypeMapping? typeMapping
    Returns
    Type Description
    AtTimeZoneExpression
    | Improve this Doc View Source

    ContainedBy(SqlExpression, SqlExpression)

    Creates a new PostgresBinaryExpression, for checking whether one value is contained by another.

    Declaration
    public virtual PostgresBinaryExpression ContainedBy(SqlExpression left, SqlExpression right)
    Parameters
    Type Name Description
    SqlExpression left
    SqlExpression right
    Returns
    Type Description
    PostgresBinaryExpression
    | Improve this Doc View Source

    Contains(SqlExpression, SqlExpression)

    Creates a new PostgresBinaryExpression, for checking whether one value contains another.

    Declaration
    public virtual PostgresBinaryExpression Contains(SqlExpression left, SqlExpression right)
    Parameters
    Type Name Description
    SqlExpression left
    SqlExpression right
    Returns
    Type Description
    PostgresBinaryExpression
    | Improve this Doc View Source

    GenerateOneBasedIndexExpression(SqlExpression)

    PostgreSQL array indexing is 1-based. If the index happens to be a constant, just increment it. Otherwise, append a +1 in the SQL.

    Declaration
    public virtual SqlExpression GenerateOneBasedIndexExpression(SqlExpression expression)
    Parameters
    Type Name Description
    SqlExpression expression
    Returns
    Type Description
    SqlExpression
    | Improve this Doc View Source

    ILike(SqlExpression, SqlExpression, SqlExpression?)

    Creates a new , for performing a PostgreSQL-specific case-insensitive string match (ILIKE).

    Declaration
    public virtual PostgresILikeExpression ILike(SqlExpression match, SqlExpression pattern, SqlExpression? escapeChar = null)
    Parameters
    Type Name Description
    SqlExpression match
    SqlExpression pattern
    SqlExpression? escapeChar
    Returns
    Type Description
    PostgresILikeExpression
    | Improve this Doc View Source

    JsonTraversal(SqlExpression, IEnumerable<SqlExpression>, bool, Type, RelationalTypeMapping?)

    Creates a new PostgresJsonTraversalExpression, for traversing inside a JSON document.

    Declaration
    public virtual PostgresJsonTraversalExpression JsonTraversal(SqlExpression expression, IEnumerable<SqlExpression> path, bool returnsText, Type type, RelationalTypeMapping? typeMapping = null)
    Parameters
    Type Name Description
    SqlExpression expression
    IEnumerable<><SqlExpression> path
    bool returnsText
    Type type
    RelationalTypeMapping? typeMapping
    Returns
    Type Description
    PostgresJsonTraversalExpression
    | Improve this Doc View Source

    JsonTraversal(SqlExpression, bool, Type, RelationalTypeMapping?)

    Creates a new PostgresJsonTraversalExpression, for traversing inside a JSON document.

    Declaration
    public virtual PostgresJsonTraversalExpression JsonTraversal(SqlExpression expression, bool returnsText, Type type, RelationalTypeMapping? typeMapping = null)
    Parameters
    Type Name Description
    SqlExpression expression
    bool returnsText
    Type type
    RelationalTypeMapping? typeMapping
    Returns
    Type Description
    PostgresJsonTraversalExpression
    | Improve this Doc View Source

    MakeBinary(ExpressionType, SqlExpression, SqlExpression, RelationalTypeMapping?)

    Declaration
    public override SqlBinaryExpression? MakeBinary(ExpressionType operatorType, SqlExpression left, SqlExpression right, RelationalTypeMapping? typeMapping)
    Parameters
    Type Name Description
    ExpressionType operatorType
    SqlExpression left
    SqlExpression right
    RelationalTypeMapping? typeMapping
    Returns
    Type Description
    SqlBinaryExpression?
    | Improve this Doc View Source

    MakePostgresBinary(PostgresExpressionType, SqlExpression, SqlExpression, RelationalTypeMapping?)

    Creates a new PostgresBinaryExpression with the given arguments.

    Declaration
    public virtual PostgresBinaryExpression MakePostgresBinary(PostgresExpressionType operatorType, SqlExpression left, SqlExpression right, RelationalTypeMapping? typeMapping = null)
    Parameters
    Type Name Description
    PostgresExpressionType operatorType

    An System.Linq.Expressions.ExpressionType representing SQL unary operator.

    SqlExpression left

    The left operand of binary operation.

    SqlExpression right

    The right operand of binary operation.

    RelationalTypeMapping? typeMapping

    A type mapping to be assigned to the created expression.

    Returns
    Type Description
    PostgresBinaryExpression

    A PostgresBinaryExpression with the given arguments.

    | Improve this Doc View Source

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

    Creates a new PostgresNewArrayExpression, for creating a new PostgreSQL array.

    Declaration
    public virtual PostgresNewArrayExpression NewArray(IReadOnlyList<SqlExpression> expressions, Type type, RelationalTypeMapping? typeMapping = null)
    Parameters
    Type Name Description
    IReadOnlyList<><SqlExpression> expressions
    Type type
    RelationalTypeMapping? typeMapping
    Returns
    Type Description
    PostgresNewArrayExpression
    | Improve this Doc View Source

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

    Constructs either a PostgresNewArrayExpression, or, if all provided expressions are constants, a single for the entire array.

    Declaration
    public virtual SqlExpression NewArrayOrConstant(IReadOnlyList<SqlExpression> expressions, Type type, RelationalTypeMapping? typeMapping = null)
    Parameters
    Type Name Description
    IReadOnlyList<><SqlExpression> expressions
    Type type
    RelationalTypeMapping? typeMapping
    Returns
    Type Description
    SqlExpression
    | Improve this Doc View Source

    Overlaps(SqlExpression, SqlExpression)

    Creates a new PostgresBinaryExpression, for checking whether one value overlaps with another.

    Declaration
    public virtual PostgresBinaryExpression Overlaps(SqlExpression left, SqlExpression right)
    Parameters
    Type Name Description
    SqlExpression left
    SqlExpression right
    Returns
    Type Description
    PostgresBinaryExpression
    | Improve this Doc View Source

    RegexMatch(SqlExpression, SqlExpression, RegexOptions)

    Creates a new PostgresRegexMatchExpression, corresponding to the PostgreSQL-specific ~ operator.

    Declaration
    public virtual PostgresRegexMatchExpression RegexMatch(SqlExpression match, SqlExpression pattern, RegexOptions options)
    Parameters
    Type Name Description
    SqlExpression match
    SqlExpression pattern
    RegexOptions options
    Returns
    Type Description
    PostgresRegexMatchExpression
    • Improve this Doc
    • View Source
    In This Article
    Back to top © Copyright 2023 The Npgsql Development Team