# Class NpgsqlShapedQueryExpressionExtensions

Namespace
  Npgsql.EntityFrameworkCore.PostgreSQL.Extensions.Internal

Assembly
  Npgsql.EntityFrameworkCore.PostgreSQL.dll

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 static class NpgsqlShapedQueryExpressionExtensions

Inheritance
  object
  NpgsqlShapedQueryExpressionExtensions

Inherited Members
  object.Equals(object)
  object.Equals(object, object)
  object.GetHashCode()
  object.GetType()
  object.MemberwiseClone()
  object.ReferenceEquals(object, object)
  object.ToString()

## Methods

### TryConvertToArray(ShapedQueryExpression, out SqlExpression?, bool, bool)

If the given `source` wraps a ValuesExpression without any additional clauses (e.g. filter, ordering...), converts that to a NewArrayExpression and returns that.

    public static bool TryConvertToArray(this ShapedQueryExpression source, out SqlExpression? array, bool ignoreOrderings = false, bool ignorePredicate = false)

#### Parameters

`source` ShapedQueryExpression
`array` SqlExpression
`ignoreOrderings` bool
`ignorePredicate` bool

#### Returns

bool

#### Remarks

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.

### TryExtractArray(ShapedQueryExpression, out SqlExpression?, out ColumnExpression?, bool, bool)

If the given `source` wraps an array-returning expression without any additional clauses (e.g. filter, ordering...), returns that expression.

    public static bool TryExtractArray(this ShapedQueryExpression source, out SqlExpression? array, out ColumnExpression? projectedColumn, bool ignoreOrderings = false, bool ignorePredicate = false)

#### Parameters

`source` ShapedQueryExpression
`array` SqlExpression
`projectedColumn` ColumnExpression
`ignoreOrderings` bool
`ignorePredicate` bool

#### Returns

bool

#### Remarks

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.

### TryExtractArray(ShapedQueryExpression, out SqlExpression?, bool, bool)

If the given `source` wraps an array-returning expression without any additional clauses (e.g. filter, ordering...), returns that expression.

    public static bool TryExtractArray(this ShapedQueryExpression source, out SqlExpression? array, bool ignoreOrderings = false, bool ignorePredicate = false)

#### Parameters

`source` ShapedQueryExpression
`array` SqlExpression
`ignoreOrderings` bool
`ignorePredicate` bool

#### Returns

bool

#### Remarks

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.

### TryExtractJsonArray(ShapedQueryExpression, out SqlExpression?, out SqlExpression?, out bool, bool, bool)

If the given `source` wraps a JSON-array-returning expression without any additional clauses (e.g. filter, ordering...), returns that expression.

    public static bool TryExtractJsonArray(this ShapedQueryExpression source, out SqlExpression? jsonArray, out SqlExpression? projectedElement, out bool isElementNullable, bool ignoreOrderings = false, bool ignorePredicate = false)

#### Parameters

`source` ShapedQueryExpression
`jsonArray` SqlExpression
`projectedElement` SqlExpression
`isElementNullable` bool
`ignoreOrderings` bool
`ignorePredicate` bool

#### Returns

bool

#### Remarks

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.