From eb92be94378aaf3230d7ec053828d1afa627d80c Mon Sep 17 00:00:00 2001 From: E-Zou Shen Date: Tue, 8 Oct 2024 01:03:36 +0800 Subject: [PATCH] feat: support RANDOM() --- field/function.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/field/function.go b/field/function.go index 4d901259..2c86b6be 100644 --- a/field/function.go +++ b/field/function.go @@ -30,3 +30,7 @@ func (f *function) FromUnixTime(date uint64, format string) String { func (f *function) Rand() String { return String{expr{e: clause.Expr{SQL: "RAND()"}}} } + +func (f *function) Random() String { + return String{expr{e: clause.Expr{SQL: "RANDOM()"}}} +}