Make OrderBy(order interface{}, args ...interface{}) #2149
No reviewers
Labels
No Label
backport/done
backport/v1
blocked
db
oracle
db
sqlserver
duplicate
feature
cache
frontport/done
frontport/main
invalid
kind
breaking
kind
bug
kind
build
kind
dependencies
kind
docs
kind
driver
kind
enhancement
kind
feature
kind
performance
kind
proposal
kind
question
kind
refactor
kind
testing
need
feedback
need
test
proposal:accepted
RaspBerry Pi
regression
skip-changelog
upstream
wip
wontfix
No Milestone
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: xorm/xorm#2149
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "order-by-interface"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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
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.
@ -459,0 +468,4 @@
}
case string:
rawOrder = order.(string)
statement.RawParams = args
Is this necessary?
Nope it's a mistake.
Hmm... thinking on it would be reasonable instead to not change the signature of
OrderBy
but instead to create a new functionOrderByWithArgs
so I've pushed that.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.574ca18480
to129d533df4
Cool I've fixed that test.
I think this is a temporary fix and #2150 will resolve the problem from the ground.
Pull request closed