mirror of
https://gitcode.com/gitea/gitea.git
synced 2025-07-01 01:43:07 +08:00
Upgrade xorm to v1.0.1 and fix start fail with potgres (#10819)
* upgrade xorm to v1.0.1 * fix start fail with postgres Co-authored-by: zeripath <art27@cantab.net>
This commit is contained in:
9
vendor/xorm.io/xorm/session.go
generated
vendored
9
vendor/xorm.io/xorm/session.go
generated
vendored
@ -99,7 +99,7 @@ func (session *Session) Init() {
|
||||
session.engine.tagParser,
|
||||
session.engine.DatabaseTZ,
|
||||
)
|
||||
|
||||
session.db = session.engine.db
|
||||
session.isAutoCommit = true
|
||||
session.isCommitedOrRollbacked = false
|
||||
session.isAutoClose = false
|
||||
@ -140,6 +140,13 @@ func (session *Session) Close() {
|
||||
}
|
||||
}
|
||||
|
||||
func (session *Session) getQueryer() core.Queryer {
|
||||
if session.tx != nil {
|
||||
return session.tx
|
||||
}
|
||||
return session.db
|
||||
}
|
||||
|
||||
// ContextCache enable context cache or not
|
||||
func (session *Session) ContextCache(context contexts.ContextCache) *Session {
|
||||
session.statement.SetContextCache(context)
|
||||
|
Reference in New Issue
Block a user