-
Notifications
You must be signed in to change notification settings - Fork 80
fix: added missing 'ORDER BY' before 'OFFSET' #219
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
Conversation
|
Can one of the admins verify this patch? To accept patch and trigger a build add comment ".ok\W+to\W+test." |
f719765 to
beae3d6
Compare
beae3d6 to
daf6eb3
Compare
|
@slnode test please |
|
How do you see this? |
|
@achrinza thank you for the pull request. Is there any reasonably-easy way how to test this change? Ideally, we should test in integration style, write a test that creates a datasource with Having said that, I don't know what version of MSSQL we use on our CI server, therefore this may not work. The second best option is to write a unit-test that will verify the SQL statement created by @raymondfeng thoughts? |
|
@bajtos I think ideally we should create a unit test to ensure a properly-generated query then put an integration test to make sure it works with MSSQL. I'm a bit busy this week, but I'll look into it when possible. |
|
Updated top comment to reflect that this PR does not resolve loopbackio/loopback-next#4160. However, this PR still does resolve the malformed T-SQL query hence should be kept open. |
|
How can I contribute to this PR and upload changes? |
|
Hi @frbuceta, apologies for not being able to continue work on this PR. AFAIK, there's only the integration tests that are missing. There are docs on how to contribute and CONTRIBUTING.md which may be helpful. For this, you can fork the main repo, apply the changes I've made, write the tests and then create a new Pull Request. |
|
Closing this in favour of #220. |
I will try to create the tests. I'm going to mention you as an author in my PR if you don't think it's wrong. |
Signed-off-by: Rifa Achrinza [email protected]
Related: loopbackio/loopback-next#4160
If the
supportsOffsetFetchis enabled, the generated SQL query is invalid as it does not comply with the expected syntax of a SELECT - ORDER BY Clause.This PR resolves this issue by prepending the missing
ORDER BYtoOFFSET.Checklist
👉 Read and sign the CLA (Contributor License Agreement) 👈
npm testpasses on your machine