-
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
Fix for #33702 Translation for the SQL Server PATINDEX function #33868
Conversation
src/EFCore.SqlServer/Query/Internal/Translators/SqlServerStringMethodTranslator.cs
Outdated
Show resolved
Hide resolved
src/EFCore.SqlServer/Extensions/SqlServerDbFunctionsExtensions.cs
Outdated
Show resolved
Hide resolved
src/EFCore.SqlServer/Extensions/SqlServerDbFunctionsExtensions.cs
Outdated
Show resolved
Hide resolved
src/EFCore.SqlServer/Extensions/SqlServerDbFunctionsExtensions.cs
Outdated
Show resolved
Hide resolved
src/EFCore.SqlServer/Extensions/SqlServerDbFunctionsExtensions.cs
Outdated
Show resolved
Hide resolved
src/EFCore.SqlServer/Extensions/SqlServerDbFunctionsExtensions.cs
Outdated
Show resolved
Hide resolved
src/EFCore.SqlServer/Query/Internal/Translators/SqlServerStringMethodTranslator.cs
Outdated
Show resolved
Hide resolved
src/EFCore.SqlServer/Query/Internal/Translators/SqlServerStringMethodTranslator.cs
Outdated
Show resolved
Hide resolved
I will try to fix this as soon as possible, but it likely won't happen before Friday. |
* The return value of EF.Functions method shouldn't be nullable * Method will need to always return long. * Moved out of the "full text" region * Removed overload with collation parameter * Removed check for SqlParameterExpression || SqlConstantExpression * Removed check for ColumnExpression
src/EFCore.SqlServer/Extensions/SqlServerDbFunctionsExtensions.cs
Outdated
Show resolved
Hide resolved
@@ -2137,6 +2137,23 @@ public static class SqlServerDbFunctionsExtensions | |||
string timeZone) | |||
=> throw new InvalidOperationException(CoreStrings.FunctionOnClient(nameof(AtTimeZone))); | |||
|
|||
/// <summary> | |||
/// A DbFunction method stub that can be used in LINQ queries to target the SQL Server <c>PATINDEX</c> store function. |
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 please align these doc comments to what's on the other functions? The summary simply summarizes what the function actually does (no mention of "DbFunction method stub" - just a copy-paste from the function docs:
Returns the starting position of the first occurrence of a pattern in a specified expression, or zero if the pattern is not found, on all valid text and character data types.
PATINDEX should be referenced in a <seealso>
element, as elsewhere.
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.
@roji
fixed
src/EFCore.SqlServer/Query/Internal/Translators/SqlServerStringMethodTranslator.cs
Outdated
Show resolved
Hide resolved
src/EFCore.SqlServer/Query/Internal/Translators/SqlServerStringMethodTranslator.cs
Outdated
Show resolved
Hide resolved
test/EFCore.SqlServer.FunctionalTests/Query/NorthwindDbFunctionsQuerySqlServerTest.cs
Outdated
Show resolved
Hide resolved
test/EFCore.SqlServer.FunctionalTests/Query/NorthwindDbFunctionsQuerySqlServerTest.cs
Outdated
Show resolved
Hide resolved
test/EFCore.SqlServer.FunctionalTests/Query/NorthwindDbFunctionsQuerySqlServerTest.cs
Outdated
Show resolved
Hide resolved
test/EFCore.SqlServer.FunctionalTests/Query/NorthwindDbFunctionsQuerySqlServerTest.cs
Outdated
Show resolved
Hide resolved
test/EFCore.SqlServer.FunctionalTests/Query/NorthwindDbFunctionsQuerySqlServerTest.cs
Outdated
Show resolved
Hide resolved
* fix documentation * remove trailing spaces * fix coalescing for second argument - TENTATIVE
test/EFCore.SqlServer.FunctionalTests/Query/NorthwindDbFunctionsQuerySqlServerTest.cs
Show resolved
Hide resolved
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.
@smnsht thanks, LGTM!
@roji |
@smnsht Thanks. |
Fix for #33702 Translation for the SQL Server PATINDEX function