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
Spatial: Translate GeometryType and OgcGeometryType #13469
Conversation
/// Gets the static type of the expression that this <see cref="Expression"/> represents. | ||
/// </summary> | ||
/// <value> The <see cref="Type"/> that represents the static type of the expression. </value> | ||
public override Type Type |
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.
Do we have a check for Empty WhenThenList?
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.
Will validate types too.
Updated. Checks for empty when list. Added type validation. Renamed |
/// <summary> | ||
/// Gets the when operand expression. | ||
/// </summary> | ||
public virtual Expression Test { get; } |
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.
Fun fact: The SQL spec actually allows for multiple tests, but I don't know of a database that implements it.
CASE Name
WHEN 'Brice', 'BRICE', 'brice' THEN 'me'
END
<value>An else result type of '{elseResultType}' is invalid. The expected type is '{resultType}'.</value> | ||
</data> | ||
<data name="CaseWhenClauseResultTypeUnexpected" xml:space="preserve"> | ||
<value>A when result type of '{whenResultType}' is invalid. The expected type is '{resultType}'.</value> |
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.
"Result type of '{whenResultType}' ..." ? Using when as a noun seems bit weird (ESL though, so I might be wrong ;))
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.
Will reword. Maybe something like "The result type 'blah' of a when clause..."
/// <summary> | ||
/// Represents a SQL CASE expression. | ||
/// </summary> | ||
public class CaseExpression : Expression |
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.
also add IPrintable, for the pretty-printing hook
Fixes #13280
Providers, this adds a class for generating SQL CASE expressions.