# 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
  ExpressionVisitor
  SqlNullabilityProcessor
  NpgsqlSqlNullabilityProcessor

Inherited Members
  SqlNullabilityProcessor.Process(Expression, ParametersCacheDecorator)
  SqlNullabilityProcessor.AddNonNullableColumn(ColumnExpression)
  SqlNullabilityProcessor.VisitExtension(Expression)
  SqlNullabilityProcessor.ProcessValuesOrderingColumn(ValuesExpression, IReadOnlyList<SqlExpression>, IntTypeMapping, ref int)
  SqlNullabilityProcessor.Visit(SelectExpression, bool)
  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.CalculateParameterBucketSize(int, RelationalTypeMapping)
  SqlNullabilityProcessor.CalculatePadding(int, int)
  SqlNullabilityProcessor.OptimizeNotExpression(SqlExpression)
  SqlNullabilityProcessor.TryMakeNonNullable(SelectExpression, out SelectExpression, out bool?)
  SqlNullabilityProcessor.IsCollectionTable(TableExpressionBase, out Expression)
  SqlNullabilityProcessor.UpdateParameterCollection(TableExpressionBase, SqlParameterExpression)
  SqlNullabilityProcessor.Dependencies
  SqlNullabilityProcessor.UseRelationalNulls
  SqlNullabilityProcessor.CollectionParameterTranslationMode
  SqlNullabilityProcessor.ParametersDecorator
  SqlNullabilityProcessor.PreferExistsToInWithCoalesce
  ExpressionVisitor.Visit(ReadOnlyCollection<Expression>)
  ExpressionVisitor.Visit(Expression)
  ExpressionVisitor.VisitAndConvert<T>(ReadOnlyCollection<T>, string)
  ExpressionVisitor.VisitAndConvert<T>(T, string)
  ExpressionVisitor.VisitBinary(BinaryExpression)
  ExpressionVisitor.VisitBlock(BlockExpression)
  ExpressionVisitor.VisitCatchBlock(CatchBlock)
  ExpressionVisitor.VisitConditional(ConditionalExpression)
  ExpressionVisitor.VisitConstant(ConstantExpression)
  ExpressionVisitor.VisitDebugInfo(DebugInfoExpression)
  ExpressionVisitor.VisitDefault(DefaultExpression)
  ExpressionVisitor.VisitDynamic(DynamicExpression)
  ExpressionVisitor.VisitElementInit(ElementInit)
  ExpressionVisitor.VisitGoto(GotoExpression)
  ExpressionVisitor.VisitIndex(IndexExpression)
  ExpressionVisitor.VisitInvocation(InvocationExpression)
  ExpressionVisitor.VisitLabel(LabelExpression)
  ExpressionVisitor.VisitLabelTarget(LabelTarget)
  ExpressionVisitor.VisitLambda<T>(Expression<T>)
  ExpressionVisitor.VisitListInit(ListInitExpression)
  ExpressionVisitor.VisitLoop(LoopExpression)
  ExpressionVisitor.VisitMember(MemberExpression)
  ExpressionVisitor.VisitMemberAssignment(MemberAssignment)
  ExpressionVisitor.VisitMemberBinding(MemberBinding)
  ExpressionVisitor.VisitMemberInit(MemberInitExpression)
  ExpressionVisitor.VisitMemberListBinding(MemberListBinding)
  ExpressionVisitor.VisitMemberMemberBinding(MemberMemberBinding)
  ExpressionVisitor.VisitMethodCall(MethodCallExpression)
  ExpressionVisitor.VisitNew(NewExpression)
  ExpressionVisitor.VisitNewArray(NewArrayExpression)
  ExpressionVisitor.VisitParameter(ParameterExpression)
  ExpressionVisitor.VisitRuntimeVariables(RuntimeVariablesExpression)
  ExpressionVisitor.VisitSwitch(SwitchExpression)
  ExpressionVisitor.VisitSwitchCase(SwitchCase)
  ExpressionVisitor.VisitTry(TryExpression)
  ExpressionVisitor.VisitTypeBinary(TypeBinaryExpression)
  ExpressionVisitor.VisitUnary(UnaryExpression)
  ExpressionVisitor.Visit<T>(ReadOnlyCollection<T>, Func<T, T>)
  object.Equals(object)
  object.Equals(object, object)
  object.GetHashCode()
  object.GetType()
  object.MemberwiseClone()
  object.ReferenceEquals(object, object)
  object.ToString()

## Constructors

### NpgsqlSqlNullabilityProcessor(RelationalParameterBasedSqlProcessorDependencies, RelationalParameterBasedSqlProcessorParameters)

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 NpgsqlSqlNullabilityProcessor(RelationalParameterBasedSqlProcessorDependencies dependencies, RelationalParameterBasedSqlProcessorParameters parameters)

#### Parameters

`dependencies` RelationalParameterBasedSqlProcessorDependencies
`parameters` RelationalParameterBasedSqlProcessorParameters

## 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.