forked from gohouse/gorose
-
Notifications
You must be signed in to change notification settings - Fork 0
/
orm_api.go
96 lines (80 loc) · 1.44 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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
package gorose
// OrmApi ...
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
}
// GetTable ...
func (o *Orm) GetTable() string {
return o.table
}
// GetFields ...
func (o *Orm) GetFields() []string {
return o.fields
}
// SetWhere ...
func (o *Orm) SetWhere(arg [][]interface{}) {
o.where = arg
}
// GetWhere ...
func (o *Orm) GetWhere() [][]interface{} {
return o.where
}
// GetOrder ...
func (o *Orm) GetOrder() string {
return o.order
}
// GetLimit ...
func (o *Orm) GetLimit() int {
return o.limit
}
// GetOffset ...
func (o *Orm) GetOffset() int {
return o.offset
}
// GetJoin ...
func (o *Orm) GetJoin() [][]interface{} {
return o.join
}
// GetDistinct ...
func (o *Orm) GetDistinct() bool {
return o.distinct
}
// GetGroup ...
func (o *Orm) GetGroup() string {
return o.group
}
// GetHaving ...
func (o *Orm) GetHaving() string {
return o.having
}
// GetData ...
func (o *Orm) GetData() interface{} {
return o.data
}
// GetForce ...
func (o *Orm) GetForce() bool {
return o.force
}
// GetExtraCols ...
func (o *Orm) GetExtraCols() []string {
return o.extraCols
}
// GetPessimisticLock ...
func (o *Orm) GetPessimisticLock() string {
return o.pessimisticLock
}