forked from gohouse/gorose
-
Notifications
You must be signed in to change notification settings - Fork 0
/
orm_api.go
80 lines (64 loc) · 1.27 KB
/
orm_api.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
package gorose
type OrmApi struct {
table string
fields []string
where [][]interface{}
order string
limit int
offset int
join [][]interface{}
distinct bool
union string
group string
having string
data interface{}
force bool
extraCols []string
// 悲观锁
pessimisticLock string
}
func (o *Orm) GetTable() string {
return o.table
}
func (o *Orm) GetFields() []string {
return o.fields
}
func (o *Orm) SetWhere(arg [][]interface{}) {
o.where = arg
}
func (o *Orm) GetWhere() [][]interface{} {
return o.where
}
func (o *Orm) GetOrder() string {
return o.order
}
func (o *Orm) GetLimit() int {
return o.limit
}
func (o *Orm) GetOffset() int {
return o.offset
}
func (o *Orm) GetJoin() [][]interface{} {
return o.join
}
func (o *Orm) GetDistinct() bool {
return o.distinct
}
func (o *Orm) GetGroup() string {
return o.group
}
func (o *Orm) GetHaving() string {
return o.having
}
func (o *Orm) GetData() interface{} {
return o.data
}
func (dba *Orm) GetForce() bool {
return dba.force
}
func (dba *Orm) GetExtraCols() []string {
return dba.extraCols
}
func (dba *Orm) GetPessimisticLock() string {
return dba.pessimisticLock
}