mirror of
https://github.com/0xJacky/nginx-ui.git
synced 2025-05-11 02:15:48 +02:00
chore: update deps
This commit is contained in:
parent
5b26763a5f
commit
61ff392c5c
39 changed files with 940 additions and 426 deletions
|
@ -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")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue