# Class NpgsqlSqlNullabilityProcessor

Namespace
  Npgsql.EntityFrameworkCore.PostgreSQL.Query.Internal

Assembly
  Npgsql.EntityFrameworkCore.PostgreSQL.dll

A class that processes a SQL tree based on nullability of nodes to apply null semantics in use and optimize it based on parameter values.

This type is typically used by database providers (and other extensions). It is generally not used in application code.

    public class NpgsqlSqlNullabilityProcessor : SqlNullabilityProcessor

Inheritance
  object
  SqlNullabilityProcessor
  NpgsqlSqlNullabilityProcessor

Inherited Members
  SqlNullabilityProcessor.Process(Expression, IReadOnlyDictionary<string, object>, out bool)
  SqlNullabilityProcessor.DoNotCache()
  SqlNullabilityProcessor.AddNonNullableColumn(ColumnExpression)
  SqlNullabilityProcessor.Visit(TableExpressionBase)
  SqlNullabilityProcessor.Visit(SelectExpression)
  SqlNullabilityProcessor.Visit(SqlExpression, out bool)
  SqlNullabilityProcessor.Visit(SqlExpression, bool, out bool)
  SqlNullabilityProcessor.VisitAtTimeZone(AtTimeZoneExpression, bool, out bool)
  SqlNullabilityProcessor.VisitCase(CaseExpression, bool, out bool)
  SqlNullabilityProcessor.VisitCollate(CollateExpression, bool, out bool)
  SqlNullabilityProcessor.VisitColumn(ColumnExpression, bool, out bool)
  SqlNullabilityProcessor.VisitDistinct(DistinctExpression, bool, out bool)
  SqlNullabilityProcessor.VisitExists(ExistsExpression, bool, out bool)
  SqlNullabilityProcessor.VisitIn(InExpression, bool, out bool)
  SqlNullabilityProcessor.VisitLike(LikeExpression, bool, out bool)
  SqlNullabilityProcessor.VisitRowNumber(RowNumberExpression, bool, out bool)
  SqlNullabilityProcessor.VisitRowValue(RowValueExpression, bool, out bool)
  SqlNullabilityProcessor.VisitScalarSubquery(ScalarSubqueryExpression, bool, out bool)
  SqlNullabilityProcessor.VisitSqlConstant(SqlConstantExpression, bool, out bool)
  SqlNullabilityProcessor.VisitSqlFragment(SqlFragmentExpression, bool, out bool)
  SqlNullabilityProcessor.VisitSqlParameter(SqlParameterExpression, bool, out bool)
  SqlNullabilityProcessor.VisitSqlUnary(SqlUnaryExpression, bool, out bool)
  SqlNullabilityProcessor.VisitJsonScalar(JsonScalarExpression, bool, out bool)
  SqlNullabilityProcessor.OptimizeNonNullableNotExpression(SqlUnaryExpression)
  SqlNullabilityProcessor.TryMakeNonNullable(SelectExpression, out SelectExpression, out bool?)
  SqlNullabilityProcessor.IsCollectionTable(TableExpressionBase, out Expression)
  SqlNullabilityProcessor.UpdateParameterCollection(TableExpressionBase, SqlParameterExpression)
  SqlNullabilityProcessor.Dependencies
  SqlNullabilityProcessor.UseRelationalNulls
  SqlNullabilityProcessor.ParameterValues
  SqlNullabilityProcessor.PreferExistsToInWithCoalesce
  object.Equals(object)
  object.Equals(object, object)
  object.GetHashCode()
  object.GetType()
  object.MemberwiseClone()
  object.ReferenceEquals(object, object)
  object.ToString()

## Constructors

### NpgsqlSqlNullabilityProcessor(RelationalParameterBasedSqlProcessorDependencies, bool)

Creates a new instance of the NpgsqlSqlNullabilityProcessor class.

    public NpgsqlSqlNullabilityProcessor(RelationalParameterBasedSqlProcessorDependencies dependencies, bool useRelationalNulls)

#### Parameters

`dependencies` RelationalParameterBasedSqlProcessorDependencies

  Parameter object containing dependencies for this class.

`useRelationalNulls` bool

  A bool value indicating whether relational null semantics are in use.

## Methods

### VisitAll(PgAllExpression, bool, out 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.

    protected virtual SqlExpression VisitAll(PgAllExpression allExpression, bool allowOptimizedExpansion, out bool nullable)

#### Parameters

`allExpression` PgAllExpression
`allowOptimizedExpansion` bool
`nullable` bool

#### Returns

SqlExpression

### VisitAny(PgAnyExpression, bool, out 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.

    protected virtual SqlExpression VisitAny(PgAnyExpression anyExpression, bool allowOptimizedExpansion, out bool nullable)

#### Parameters

`anyExpression` PgAnyExpression
`allowOptimizedExpansion` bool
`nullable` bool

#### Returns

SqlExpression

### VisitArrayIndex(PgArrayIndexExpression, bool, out 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.

    protected virtual SqlExpression VisitArrayIndex(PgArrayIndexExpression arrayIndexExpression, bool allowOptimizedExpansion, out bool nullable)

#### Parameters

`arrayIndexExpression` PgArrayIndexExpression
`allowOptimizedExpansion` bool
`nullable` bool

#### Returns

SqlExpression

### VisitArraySlice(PgArraySliceExpression, bool, out 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.

    protected virtual SqlExpression VisitArraySlice(PgArraySliceExpression arraySliceExpression, bool allowOptimizedExpansion, out bool nullable)

#### Parameters

`arraySliceExpression` PgArraySliceExpression
`allowOptimizedExpansion` bool
`nullable` bool

#### Returns

SqlExpression

### VisitCustomSqlExpression(SqlExpression, bool, out bool)

Visits a custom SqlExpression added by providers and computes its nullability.

    protected override SqlExpression VisitCustomSqlExpression(SqlExpression sqlExpression, bool allowOptimizedExpansion, out bool nullable)

#### Parameters

`sqlExpression` SqlExpression

  A sql expression to visit.

`allowOptimizedExpansion` bool

  A bool value indicating if optimized expansion which considers null value as false value is allowed.

`nullable` bool

  A bool value indicating whether the sql expression is nullable.

#### Returns

SqlExpression

  An optimized sql expression.

### VisitILike(PgILikeExpression, bool, out 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.

    protected virtual SqlExpression VisitILike(PgILikeExpression iLikeExpression, bool allowOptimizedExpansion, out bool nullable)

#### Parameters

`iLikeExpression` PgILikeExpression
`allowOptimizedExpansion` bool
`nullable` bool

#### Returns

SqlExpression

### VisitJsonTraversal(PgJsonTraversalExpression, bool, out 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.

    protected virtual SqlExpression VisitJsonTraversal(PgJsonTraversalExpression jsonTraversalExpression, bool allowOptimizedExpansion, out bool nullable)

#### Parameters

`jsonTraversalExpression` PgJsonTraversalExpression
`allowOptimizedExpansion` bool
`nullable` bool

#### Returns

SqlExpression

### VisitNewArray(PgNewArrayExpression, bool, out 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.

    protected virtual SqlExpression VisitNewArray(PgNewArrayExpression newArrayExpression, bool allowOptimizedExpansion, out bool nullable)

#### Parameters

`newArrayExpression` PgNewArrayExpression
`allowOptimizedExpansion` bool
`nullable` bool

#### Returns

SqlExpression

### VisitPostgresBinary(PgBinaryExpression, bool, out 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.

    protected virtual SqlExpression VisitPostgresBinary(PgBinaryExpression binaryExpression, bool allowOptimizedExpansion, out bool nullable)

#### Parameters

`binaryExpression` PgBinaryExpression
`allowOptimizedExpansion` bool
`nullable` bool

#### Returns

SqlExpression

### VisitRegexMatch(PgRegexMatchExpression, bool, out 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.

    protected virtual SqlExpression VisitRegexMatch(PgRegexMatchExpression regexMatchExpression, bool allowOptimizedExpansion, out bool nullable)

#### Parameters

`regexMatchExpression` PgRegexMatchExpression
`allowOptimizedExpansion` bool
`nullable` bool

#### Returns

SqlExpression

### VisitRowValueExpression(PgRowValueExpression, bool, out 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.

    protected virtual SqlExpression VisitRowValueExpression(PgRowValueExpression rowValueExpression, bool allowOptimizedExpansion, out bool nullable)

#### Parameters

`rowValueExpression` PgRowValueExpression
`allowOptimizedExpansion` bool
`nullable` bool

#### Returns

SqlExpression

### VisitSqlBinary(SqlBinaryExpression, bool, out bool)

Visits a SqlBinaryExpression and computes its nullability.

    protected override SqlExpression VisitSqlBinary(SqlBinaryExpression sqlBinaryExpression, bool allowOptimizedExpansion, out bool nullable)

#### Parameters

`sqlBinaryExpression` SqlBinaryExpression

  A sql binary expression to visit.

`allowOptimizedExpansion` bool

  A bool value indicating if optimized expansion which considers null value as false value is allowed.

`nullable` bool

  A bool value indicating whether the sql expression is nullable.

#### Returns

SqlExpression

  An optimized sql expression.

### VisitSqlFunction(SqlFunctionExpression, bool, out 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.

    protected override SqlExpression VisitSqlFunction(SqlFunctionExpression sqlFunctionExpression, bool allowOptimizedExpansion, out bool nullable)

#### Parameters

`sqlFunctionExpression` SqlFunctionExpression
`allowOptimizedExpansion` bool
`nullable` bool

#### Returns

SqlExpression

### VisitUnknownBinary(PgUnknownBinaryExpression, bool, out bool)

Visits a PgUnknownBinaryExpression and computes its nullability.

    protected virtual SqlExpression VisitUnknownBinary(PgUnknownBinaryExpression unknownBinaryExpression, bool allowOptimizedExpansion, out bool nullable)

#### Parameters

`unknownBinaryExpression` PgUnknownBinaryExpression

  A PgUnknownBinaryExpression expression to visit.

`allowOptimizedExpansion` bool

  A bool value indicating if optimized expansion which considers null value as false value is allowed.

`nullable` bool

  A bool value indicating whether the sql expression is nullable.

#### Returns

SqlExpression

  An optimized sql expression.