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

Custom method can now have nullable parameters and nullable arguments #1090

Open
wants to merge 3 commits into
base: release-8.x
Choose a base branch
from

Conversation

bjelbo
Copy link

@bjelbo bjelbo commented Nov 11, 2023

Fixes #1084

This PR will make it possible to create custom function for nullable types.

@@ -761,7 +761,7 @@ protected virtual Expression BindCustomMethodExpressionOrNull(SingleValueFunctio
MethodInfo methodInfo;
if (UriFunctionsBinder.TryGetMethodInfo(node.Name, methodArgumentsType, out methodInfo))
{
return ExpressionBinderHelper.MakeFunctionCall(methodInfo, context.QuerySettings, arguments);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

MakeFunctionCall

MakeFunctionCall does MORE than MakeCustomFunctionCall. So, it's enough and safe to change using MakeCustomFunctionCall?

Copy link
Author

@bjelbo bjelbo Nov 13, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have trouble seeing why HandleNullPropagation check is needed in custom functions. Do you know of a use case where this could be used for custom functions?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@xuzhg Any comment to my question

@wachugamaina
Copy link

Please add a description to what the pr does.

@wachugamaina
Copy link

Please add some test to this Pr

@bjelbo
Copy link
Author

bjelbo commented Sep 25, 2024

@xuzhg I know this PR is old but it is still relevant

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Custom Method with nullable properties
3 participants