-
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
SQLite Query: Translate Math.Max, Min & Round #10533
Conversation
(There was no direct translation of |
{ typeof(Math).GetMethod(nameof(Math.Round), new[]{ typeof(decimal), typeof(int) }), "round" } | ||
}; | ||
|
||
static SqliteMathTranslator() |
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.
Add access-level modifier.
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.
Invalid syntax. This is a static constructor...
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.
😮
|
||
private static void AddSupportedTranslation(Type declaringType, string clrMethodName, string sqlFunctionName) | ||
{ | ||
var methodInfos = declaringType.GetTypeInfo().GetDeclaredMethods(clrMethodName); |
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.
inline var.
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.
(Less readable to me.)
@@ -616,6 +616,22 @@ public virtual void Where_math_sign() | |||
entryCount: 13); | |||
} | |||
|
|||
[ConditionalFact] | |||
public virtual void Where_math_max() |
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.
Can you add SQL Assertions in SqlServer? They would client eval but it would be still good to have it so that we know it actually does not translate fully.
Fixes #10526