mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-06-21 08:30:50 +00:00
code fix #941 caution: undertest
This commit is contained in:
parent
b99c4baab2
commit
6d0f3a07d4
10 changed files with 310 additions and 260 deletions
|
@ -24,12 +24,22 @@ import (
|
|||
type Engine interface {
|
||||
Delete(interface{}) (int64, error)
|
||||
Exec(string, ...interface{}) (sql.Result, error)
|
||||
Find(interface{}, ...interface{}) error
|
||||
Get(interface{}) (bool, error)
|
||||
Insert(...interface{}) (int64, error)
|
||||
InsertOne(interface{}) (int64, error)
|
||||
Id(interface{}) *xorm.Session
|
||||
Sql(string, ...interface{}) *xorm.Session
|
||||
Where(string, ...interface{}) *xorm.Session
|
||||
}
|
||||
|
||||
func sessionRelease(sess *xorm.Session) {
|
||||
if !sess.IsCommitedOrRollbacked {
|
||||
sess.Rollback()
|
||||
}
|
||||
sess.Close()
|
||||
}
|
||||
|
||||
var (
|
||||
x *xorm.Engine
|
||||
tables []interface{}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue