From 4b15ab5e99d0de8a62b9f4f73071f89cef6e0c40 Mon Sep 17 00:00:00 2001 From: John Guo Date: Sun, 2 May 2021 16:42:34 +0800 Subject: [PATCH] improve OrderRandom function for package gdb --- database/gdb/gdb_model_condition.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/database/gdb/gdb_model_condition.go b/database/gdb/gdb_model_condition.go index 3ece170d8..b71288647 100644 --- a/database/gdb/gdb_model_condition.go +++ b/database/gdb/gdb_model_condition.go @@ -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