mirror of
https://gitee.com/johng/gf
synced 2026-07-06 21:45:34 +08:00
improve OrderRandom function for package gdb
This commit is contained in:
@ -235,7 +235,7 @@ func (m *Model) OrderDesc(column string) *Model {
|
||||
}
|
||||
|
||||
// OrderRandom sets the "ORDER BY RANDOM()" statement for the model.
|
||||
func (m *Model) OrderRandom(orderBy ...string) *Model {
|
||||
func (m *Model) OrderRandom() *Model {
|
||||
model := m.getModel()
|
||||
model.orderBy = "RAND()"
|
||||
return model
|
||||
|
||||
Reference in New Issue
Block a user