From fa6f41b1a3695456cee4bb717e58122448fc25f2 Mon Sep 17 00:00:00 2001 From: Michael Li Date: Thu, 30 Mar 2023 17:35:40 +0800 Subject: [PATCH] upgrade github.com/alimy/yesql => v0.7.0 --- go.mod | 2 +- go.sum | 4 ++-- internal/dao/sakila/sqlx.go | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/go.mod b/go.mod index 50d2c35d..334dc411 100644 --- a/go.mod +++ b/go.mod @@ -7,7 +7,7 @@ require ( github.com/afocus/captcha v0.0.0-20191010092841-4bd1f21c8868 github.com/alimy/cfg v0.3.0 github.com/alimy/mir/v3 v3.1.1 - github.com/alimy/yesql v0.6.0 + github.com/alimy/yesql v0.7.0 github.com/aliyun/aliyun-oss-go-sdk v2.2.7+incompatible github.com/allegro/bigcache/v3 v3.0.2 github.com/bytedance/sonic v1.8.5 diff --git a/go.sum b/go.sum index 5cf420e2..3e593b7b 100644 --- a/go.sum +++ b/go.sum @@ -127,8 +127,8 @@ github.com/alimy/cfg v0.3.0 h1:9xgA0QWVCPSq9fFNRcYahVCAX22IL9ts2wrTQPfAStY= github.com/alimy/cfg v0.3.0/go.mod h1:rOxbasTH2srl6StAjNF5Vyi8bfrdkl3fLGmOYtSw81c= github.com/alimy/mir/v3 v3.1.1 h1:3tz7uGOwuA1IKU0BysyBvGbyqKtEVMuhPBD/APk1ANw= github.com/alimy/mir/v3 v3.1.1/go.mod h1:ybhT2ijOiDn0lLwWzIY6vXdv+uzZrctS7VFfczcXBWU= -github.com/alimy/yesql v0.6.0 h1:QPStfsUCBrbGWAIVZWXTqSRQgAMW1a6Kdb2meqWCf6I= -github.com/alimy/yesql v0.6.0/go.mod h1:Y0FdRIwIbJyTv56wSX+MpaIHiAW1PyKTDYO6K/er4JY= +github.com/alimy/yesql v0.7.0 h1:SugF94EN8ZhQrSaoRe6nfFjB4Ev/an9uzuzBHR6jsAY= +github.com/alimy/yesql v0.7.0/go.mod h1:Y0FdRIwIbJyTv56wSX+MpaIHiAW1PyKTDYO6K/er4JY= github.com/aliyun/aliyun-oss-go-sdk v2.2.7+incompatible h1:KpbJFXwhVeuxNtBJ74MCGbIoaBok2uZvkD7QXp2+Wis= github.com/aliyun/aliyun-oss-go-sdk v2.2.7+incompatible/go.mod h1:T/Aws4fEfogEE9v+HPhhw+CntffsBHJ8nXQCwKr0/g8= github.com/allegro/bigcache/v3 v3.0.2 h1:AKZCw+5eAaVyNTBmI2fgyPVJhHkdWder3O9IrprcQfI= diff --git a/internal/dao/sakila/sqlx.go b/internal/dao/sakila/sqlx.go index 5db704aa..7b245ac8 100644 --- a/internal/dao/sakila/sqlx.go +++ b/internal/dao/sakila/sqlx.go @@ -127,7 +127,7 @@ func yesqlScan[T any](query yesql.SQLQuery, obj T) T { func initSqlxDB() { _db = conf.MustSqlxDB() yesql.UseSqlx(_db) - yesql.SetDefaultQueryHooks(func(query *yesql.Query) (*yesql.Query, error) { + yesql.SetDefaultQueryHook(func(query *yesql.Query) (*yesql.Query, error) { qstr := strings.TrimRight(query.Query, ";") // table name fixed qstr = strings.Replace(qstr, "@", conf.DatabaseSetting.TablePrefix, -1)