-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathtypes.go
More file actions
52 lines (43 loc) · 859 Bytes
/
Copy pathtypes.go
File metadata and controls
52 lines (43 loc) · 859 Bytes
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
// Author : Eric<eehsiao@gmail.com>
package sqlbuilder
// SQLBuilder is the main struct type
type SQLBuilder struct {
driverType string
// default database and table
dbName string
tbName string
buildedStr string
// for select , delete
distinct bool
selects []string
froms []string
joins []string
wheres []string
orders []string
groups []string
havings string
limit string
top string
// for insert
into string
fields []string
values [][]interface{}
// for update
sets []Set
}
// SQLVar can that you sql internal function via NewSQLVar()
type SQLVar struct {
VarS string
}
// Set is a type that define the update set struct
type Set struct {
K string
V interface{}
}
// SubCond struct for join condition
type SubCond struct {
c bool // true is and else or
s string
o string
v interface{}
}