summaryrefslogtreecommitdiffstats
path: root/models/models.go
diff options
context:
space:
mode:
authorUnknwon <joe2010xtmf@163.com>2014-10-19 01:35:24 -0400
committerUnknwon <joe2010xtmf@163.com>2014-10-19 01:35:24 -0400
commita342d58d7e208ef64d29151970244de7f7b4fac6 (patch)
tree55972233ac1517513d865dc2ba4895b7cdaf95cb /models/models.go
parentd7d167ac63e0ada717f78383016f5b208a1b209a (diff)
downloadgitea-a342d58d7e208ef64d29151970244de7f7b4fac6.tar.gz
gitea-a342d58d7e208ef64d29151970244de7f7b4fac6.zip
Able to fork repo to individuals
Diffstat (limited to 'models/models.go')
-rw-r--r--models/models.go12
1 files changed, 10 insertions, 2 deletions
diff --git a/models/models.go b/models/models.go
index 4dcc447b34..46716728b0 100644
--- a/models/models.go
+++ b/models/models.go
@@ -5,6 +5,7 @@
package models
import (
+ "database/sql"
"fmt"
"os"
"path"
@@ -17,9 +18,16 @@ import (
"github.com/gogits/gogs/modules/setting"
)
+// Engine represents a xorm engine or session.
+type Engine interface {
+ Delete(interface{}) (int64, error)
+ Exec(string, ...interface{}) (sql.Result, error)
+ Insert(...interface{}) (int64, error)
+}
+
var (
- x *xorm.Engine
- tables []interface{}
+ x *xorm.Engine
+ tables []interface{}
HasEngine bool
DbCfg struct {