-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmodels.go
More file actions
32 lines (30 loc) · 724 Bytes
/
Copy pathmodels.go
File metadata and controls
32 lines (30 loc) · 724 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
package sqlseeder
// SQLStatement represents an individual SQL statement with multiple rows of data
type SQLStatement struct {
Schema string
Table string
Columns []string
Rows []map[string]interface{}
}
type ManyToManyRelation struct {
Table string
FirstTable string
SecondTable string
FirstSearchColumn string
SecondSearchColumn string
Columns []string
}
type OneToManyRelation struct {
Table string
PrimaryKey string
ForeignKey string
SearchKey string
}
type ColumnsStatemntParts struct {
RootColumns []string
ManyToManyColumns []string
}
// SQLData represents all SQL statements to be executed
type SQLData struct {
Statements []SQLStatement
}