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

Refactor query SQL generation for standardization #16136

Merged
merged 1 commit into from
Jun 18, 2019
Merged

Conversation

roji
Copy link
Member

@roji roji commented Jun 18, 2019

  • GenerateTop() implementation moved to SqlServer
  • GenerateLimitOffset() generates ISO SQL:2008 by default, overridden by SqlServer (and Sqlite)

* GenerateTop() implementation moved to SqlServer
* GenerateLimitOffset() generates ISO SQL:2008 by default, overridden
  by SqlServer (and Sqlite)
@roji roji requested a review from dougbu as a code owner June 18, 2019 15:19
@@ -562,6 +555,15 @@ protected virtual void GenerateLimitOffset(SelectExpression selectExpression)
_relationalCommandBuilder.Append(" ROWS ONLY");
}
}
else if (selectExpression.Limit != null)
Copy link
Member

Choose a reason for hiding this comment

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

DRY with above block.

Copy link
Member Author

Choose a reason for hiding this comment

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

Note the different between FETCH FIRST and FETCH NEXT... Doesn't seem worth DRYing...

Copy link
Member

Choose a reason for hiding this comment

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

One line difference was reason for DRYing

@roji roji merged commit df9e419 into master Jun 18, 2019
@ghost ghost deleted the SqlGeneratorStandard branch June 18, 2019 15:36
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.

2 participants