chore: update deps

This commit is contained in:
Jacky 2025-04-17 18:43:34 +08:00
parent 5b26763a5f
commit 61ff392c5c
No known key found for this signature in database
GPG key ID: 215C21B10DF38B4D
39 changed files with 940 additions and 426 deletions

View file

@ -114,11 +114,14 @@ func (s *site) fillFieldMap() {
func (s site) clone(db *gorm.DB) site {
s.siteDo.ReplaceConnPool(db.Statement.ConnPool)
s.EnvGroup.db = db.Session(&gorm.Session{Initialized: true})
s.EnvGroup.db.Statement.ConnPool = db.Statement.ConnPool
return s
}
func (s site) replaceDB(db *gorm.DB) site {
s.siteDo.ReplaceDB(db)
s.EnvGroup.db = db.Session(&gorm.Session{})
return s
}
@ -155,6 +158,11 @@ func (a siteBelongsToEnvGroup) Model(m *model.Site) *siteBelongsToEnvGroupTx {
return &siteBelongsToEnvGroupTx{a.db.Model(m).Association(a.Name())}
}
func (a siteBelongsToEnvGroup) Unscoped() *siteBelongsToEnvGroup {
a.db = a.db.Unscoped()
return &a
}
type siteBelongsToEnvGroupTx struct{ tx *gorm.Association }
func (a siteBelongsToEnvGroupTx) Find() (result *model.EnvGroup, err error) {
@ -193,6 +201,11 @@ func (a siteBelongsToEnvGroupTx) Count() int64 {
return a.tx.Count()
}
func (a siteBelongsToEnvGroupTx) Unscoped() *siteBelongsToEnvGroupTx {
a.tx = a.tx.Unscoped()
return &a
}
type siteDo struct{ gen.DO }
// FirstByID Where("id=@id")