mirror of
https://github.com/go-gitea/gitea
synced 2025-07-22 18:28:37 +00:00
Upgrade xorm to v1.1.0 (#15869)
This commit is contained in:
11
vendor/xorm.io/xorm/engine_group.go
generated
vendored
11
vendor/xorm.io/xorm/engine_group.go
generated
vendored
@@ -79,7 +79,7 @@ func (eg *EngineGroup) Close() error {
|
||||
return nil
|
||||
}
|
||||
|
||||
// ContextHook returned a group session
|
||||
// Context returned a group session
|
||||
func (eg *EngineGroup) Context(ctx context.Context) *Session {
|
||||
sess := eg.NewSession()
|
||||
sess.isAutoClose = true
|
||||
@@ -144,6 +144,7 @@ func (eg *EngineGroup) SetLogger(logger interface{}) {
|
||||
}
|
||||
}
|
||||
|
||||
// AddHook adds Hook
|
||||
func (eg *EngineGroup) AddHook(hook contexts.Hook) {
|
||||
eg.Engine.AddHook(hook)
|
||||
for i := 0; i < len(eg.slaves); i++ {
|
||||
@@ -167,6 +168,14 @@ func (eg *EngineGroup) SetMapper(mapper names.Mapper) {
|
||||
}
|
||||
}
|
||||
|
||||
// SetTagIdentifier set the tag identifier
|
||||
func (eg *EngineGroup) SetTagIdentifier(tagIdentifier string) {
|
||||
eg.Engine.SetTagIdentifier(tagIdentifier)
|
||||
for i := 0; i < len(eg.slaves); i++ {
|
||||
eg.slaves[i].SetTagIdentifier(tagIdentifier)
|
||||
}
|
||||
}
|
||||
|
||||
// SetMaxIdleConns set the max idle connections on pool, default is 2
|
||||
func (eg *EngineGroup) SetMaxIdleConns(conns int) {
|
||||
eg.Engine.DB().SetMaxIdleConns(conns)
|
||||
|
Reference in New Issue
Block a user