From c25530b6eacd21aba162641777b4bb66c7e998e9 Mon Sep 17 00:00:00 2001 From: xielong Date: Sun, 29 May 2022 22:34:01 +0800 Subject: [PATCH] make the default time format of mysql8 with nano second --- dialect/mysql/mysql.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/dialect/mysql/mysql.go b/dialect/mysql/mysql.go index 1d9043c6..aea8cdc7 100644 --- a/dialect/mysql/mysql.go +++ b/dialect/mysql/mysql.go @@ -1,6 +1,8 @@ package mysql import ( + "time" + "github.com/doug-martin/goqu/v9" "github.com/doug-martin/goqu/v9/exp" ) @@ -84,6 +86,7 @@ func DialectOptions() *goqu.SQLDialectOptions { func DialectOptionsV8() *goqu.SQLDialectOptions { opts := DialectOptions() opts.SupportsWindowFunction = true + opts.TimeFormat = time.RFC3339Nano return opts }