Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 3 additions & 12 deletions src/EFCore.PG/Query/Expressions/Internal/ArrayAnyAllExpression.cs
Original file line number Diff line number Diff line change
Expand Up @@ -71,11 +71,6 @@ public class ArrayAnyAllExpression : Expression, IEquatable<ArrayAnyAllExpressio
/// </summary>
public virtual ArrayComparisonType ArrayComparisonType { get; }

/// <summary>
/// True if this instance represents: {operand} = ANY ({array})".
/// </summary>
public bool IsContainsExpression => ArrayComparisonType is ArrayComparisonType.ANY && Operator is "=";

/// <summary>
/// Constructs a <see cref="ArrayAnyAllExpression"/>.
/// </summary>
Expand All @@ -90,14 +85,10 @@ public ArrayAnyAllExpression(
[NotNull] Expression operand,
[NotNull] Expression array)
{
Check.NotNull(array, nameof(operatorSymbol));
Check.NotNull(operand, nameof(operand));
Check.NotNull(array, nameof(array));

ArrayComparisonType = arrayComparisonType;
Operator = operatorSymbol;
Operand = operand;
Array = array;
Operator = Check.NotNull(operatorSymbol, nameof(operatorSymbol));
Operand = Check.NotNull(operand, nameof(operand));
Array = Check.NotNull(array, nameof(array));
}

/// <inheritdoc />
Expand Down
16 changes: 12 additions & 4 deletions src/EFCore.PG/Query/Sql/Internal/NpgsqlQuerySqlGeneratorFactory.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#region License

// The PostgreSQL License
//
// Copyright (C) 2016 The Npgsql Development Team
Expand All @@ -19,6 +20,7 @@
// AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS
// ON AN "AS IS" BASIS, AND THE NPGSQL DEVELOPMENT TEAM HAS NO OBLIGATIONS
// TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.

#endregion

using JetBrains.Annotations;
Expand All @@ -29,18 +31,24 @@

namespace Npgsql.EntityFrameworkCore.PostgreSQL.Query.Sql.Internal
{
/// <summary>
/// The default factory for Npgsql-specific query SQL generators.
/// </summary>
public class NpgsqlQuerySqlGeneratorFactory : QuerySqlGeneratorFactoryBase
{
readonly INpgsqlOptions _npgsqlOptions;
/// <summary>
/// Represents options for Npgsql that can only be set by the service provider.
/// </summary>
[NotNull] readonly INpgsqlOptions _npgsqlOptions;

/// <inheritdoc />
public NpgsqlQuerySqlGeneratorFactory(
[NotNull] QuerySqlGeneratorDependencies dependencies,
[NotNull] INpgsqlOptions npgsqlOptions)
: base(dependencies)
{
_npgsqlOptions = npgsqlOptions;
}
=> _npgsqlOptions = Check.NotNull(npgsqlOptions, nameof(npgsqlOptions));

/// <inheritdoc />
public override IQuerySqlGenerator CreateDefault(SelectExpression selectExpression)
=> new NpgsqlQuerySqlGenerator(
Dependencies,
Expand Down