Make OrderBy(order interface{}, args ...interface{}) #2149

Closed
zeripath wants to merge 6 commits from order-by-interface into master
Contributor

Instead of forcing OrderBy to be a string this PR allows
OrderBy to pass in either a builder.Cond or a string-args pair.

Signed-off-by: Andrew Thornton art27@cantab.net

Instead of forcing OrderBy to be a string this PR allows OrderBy to pass in either a builder.Cond or a string-args pair. Signed-off-by: Andrew Thornton <art27@cantab.net>
zeripath added 1 commit 2022-05-29 09:44:05 +00:00
Make OrderBy(order interface{}, args ...interface{})
Instead of forcing OrderBy to be a string this PR allows
OrderBy to pass in either a builder.Cond or a string-args pair.

Signed-off-by: Andrew Thornton <art27@cantab.net>
Some checks failed
continuous-integration/drone/pr Build is failing
bccf0686ef
Author
Contributor

This PR does change the interface of Engine so we might want to create a different function name for this addtional functionality.


Edit: I've changed this to create a new func OrderByWithArgs instead... see below.

This PR does change the interface of Engine so we might want to create a different function name for this addtional functionality. --- Edit: I've changed this to create a new func OrderByWithArgs instead... see below.
lunny reviewed 2022-05-29 11:45:07 +00:00
@ -459,0 +468,4 @@
}
case string:
rawOrder = order.(string)
statement.RawParams = args
Owner

Is this necessary?

Is this necessary?
Author
Contributor

Nope it's a mistake.

Nope it's a mistake.
zeripath marked this conversation as resolved
zeripath added 1 commit 2022-05-29 12:21:46 +00:00
oops
Signed-off-by: Andrew Thornton <art27@cantab.net>
All checks were successful
continuous-integration/drone/pr Build is passing
ccabd3adb3
zeripath added 1 commit 2022-05-29 12:29:49 +00:00
Instead of changing the signature of OrderBy just add OrderByWithArgs
Signed-off-by: Andrew Thornton <art27@cantab.net>
Some checks failed
continuous-integration/drone/pr Build is failing
9c3cc96cb2
Author
Contributor

Hmm... thinking on it would be reasonable instead to not change the signature of OrderBy but instead to create a new function OrderByWithArgs so I've pushed that.

Hmm... thinking on it would be reasonable instead to not change the signature of `OrderBy` but instead to create a new function `OrderByWithArgs` so I've pushed that.
zeripath added 1 commit 2022-05-30 07:48:02 +00:00
Merge branch 'master' into order-by-interface
Some checks failed
continuous-integration/drone/pr Build is failing
5045ec0d3e
Author
Contributor

There's a strange issue in TestTableIndices affecting MySQL8 which I think is doing some internal mapping with the duplicated indices in that test f_two_f_one and f_one_f_two. This PR cannot be responsible for the test failure but I've pushed up a fix that avoids that problem.

There's a strange issue in `TestTableIndices` affecting MySQL8 which I think is doing some internal mapping with the duplicated indices in that test f_two_f_one and f_one_f_two. This PR cannot be responsible for the test failure but I've pushed up a fix that avoids that problem.
zeripath force-pushed order-by-interface from 574ca18480 to 129d533df4 2022-05-30 09:44:21 +00:00 Compare
Author
Contributor

Cool I've fixed that test.

Cool I've fixed that test.
Owner

I think this is a temporary fix and #2150 will resolve the problem from the ground.

I think this is a temporary fix and #2150 will resolve the problem from the ground.
zeripath added 1 commit 2022-05-30 11:14:09 +00:00
Merge branch 'master' into order-by-interface
All checks were successful
continuous-integration/drone/pr Build is passing
5315a26382
lunny closed this pull request 2022-06-01 06:49:15 +00:00
All checks were successful
continuous-integration/drone/pr Build is passing

Pull request closed

Sign in to join this conversation.
No description provided.