You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: random.go
    path of file: ./repos/photoprism/pkg/sortby
    
    the code of the file until where you have to start completion: package sortby

import (
	"github.com/jinzhu/gorm"
	_ "github.com/jinzhu/gorm/dialects/mysql"
	
    
func RandomExpr(dialect gorm.Dialect) *gorm.SqlExpr {
	switch dialect.GetName() {
	case MySQL:
		// A seed integer can be passed as an argument, e.g. "RAND(2342)", to generate
		// reproducible pseudo-random values, see https://mariadb.com/kb/en/rand/.
		return gorm.Expr("RAND()")
	case SQLite3:
		// SQLite does not support specifying a seed to generate a deterministic sequence
		// of pseudo-random values, see https://www.sqlite.org/lang_corefunc.html#random.
		return gorm.Expr("RANDOM()")
	default:
		return gorm.Expr("RAND()")
	}
}