Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Further function nullability propagation work #20031

Merged
merged 1 commit into from
Feb 25, 2020
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
4 changes: 4 additions & 0 deletions src/EFCore.Relational/Query/ISqlExpressionFactory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -94,19 +94,22 @@ SqlUnaryExpression Convert(
CaseExpression Case([NotNull] SqlExpression operand, [NotNull] params CaseWhenClause[] whenClauses);
CaseExpression Case([NotNull] IReadOnlyList<CaseWhenClause> whenClauses, [CanBeNull] SqlExpression elseResult);

[Obsolete("Use overload that explicitly specifies value for 'argumentsPropagateNullability' argument.")]
SqlFunctionExpression Function(
[NotNull] string name,
[NotNull] IEnumerable<SqlExpression> arguments,
[NotNull] Type returnType,
[CanBeNull] RelationalTypeMapping typeMapping = null);

[Obsolete("Use overload that explicitly specifies value for 'argumentsPropagateNullability' argument.")]
SqlFunctionExpression Function(
[CanBeNull] string schema,
[NotNull] string name,
[NotNull] IEnumerable<SqlExpression> arguments,
[NotNull] Type returnType,
[CanBeNull] RelationalTypeMapping typeMapping = null);

[Obsolete("Use overload that explicitly specifies value for 'argumentsPropagateNullability' argument.")]
SqlFunctionExpression Function(
[CanBeNull] SqlExpression instance,
[NotNull] string name,
Expand All @@ -125,6 +128,7 @@ SqlFunctionExpression Function(
[NotNull] Type returnType,
[CanBeNull] RelationalTypeMapping typeMapping = null);

[Obsolete("Use overload that explicitly specifies value for 'argumentsPropagateNullability' argument.")]
SqlFunctionExpression Function(
[CanBeNull] SqlExpression instance,
[NotNull] string name,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,10 @@ public virtual SqlExpression Translate(SqlExpression instance, MemberInfo member
{
_sqlExpressionFactory.Fragment(value),
instance
}, returnType);
},
nullable: true,
argumentsPropagateNullability: new [] { false, true },
returnType);
}

return null;
Expand Down