upgrade github.com/alimy/yesql => v0.7.0

r/paopao-ce-xtra
Michael Li 2 years ago
parent be1bf935e8
commit fa6f41b1a3
No known key found for this signature in database

@ -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

@ -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=

@ -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)

Loading…
Cancel
Save