-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
Query: Add support for instance based SqlFunction #10370
Conversation
@@ -1348,6 +1363,7 @@ public virtual Expression VisitSqlFunction(SqlFunctionExpression sqlFunctionExpr | |||
/// <param name="functionName">The function name</param> | |||
/// <param name="arguments">The function arguments</param> | |||
/// <param name="schema">The function schema</param> | |||
[Obsolete("Override VisitSqlFunction method instead.")] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added obsolete to avoid breaks. (3 of them in this file)
It was dead and obscure coding style. Only providers would be overriding them.
Break or obsolete?
f3a926b
to
e11f279
Compare
@@ -16,7 +16,7 @@ namespace Microsoft.EntityFrameworkCore.Query.Expressions | |||
/// <summary> | |||
/// Represents a SQL function call expression. | |||
/// </summary> | |||
[DebuggerDisplay("{this.FunctionName}({string.Join(\", \", this.Arguments)})")] | |||
[DebuggerDisplay("{this.Instance}.{this.FunctionName}({string.Join(\", \", this.Arguments)})")] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Make helper method and call so you can handle null Instance case?
We ideally want some test coverage for this. The problem is that we need a "non-static" function to call on the server. One thing we could do is create a test method call translator that binds to some non-existent store function. We could then swallow the execution error but at least be able to verify the SQL. cc @ajcvickers |
e11f279
to
3c57461
Compare
Part of #10109