File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11package schema
22
3+ type ReferenceOption string
4+
5+ const (
6+ ReferenceOptionCascade ReferenceOption = "CASCADE"
7+ ReferenceOptionNoAction ReferenceOption = "NO ACTION"
8+ ReferenceOptionSetDefault ReferenceOption = "SET DEFAULT"
9+ ReferenceOptionSetNull ReferenceOption = "SET NULL"
10+ ReferenceOptionRestrict ReferenceOption = "RESTRICT"
11+ )
12+
313type Table struct {
4- Name string
5- Schema string
6- Fields []* Field
14+ Fields []* Field
15+ ForeingKeys []* ForeingKey
16+ Name string
17+ Schema string
718}
819
920type Field struct {
10- Name string
11- Type string
21+ Default string
22+ Name string
23+ Nullable bool
24+ Primary bool
25+ Type string
26+ }
27+
28+ type ForeingKey struct {
29+ Fields []* Field
30+ Name string
31+ OnDelete ReferenceOption
32+ OnUpdate ReferenceOption
33+ ReferredTable []* Table
34+ ReferredFields []* Field
1235}
Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ type User struct {
1616func TestHttpTransport (t * testing.T ) {
1717 user := User {}
1818 userType := reflect .TypeOf (user )
19- for i := 0 ; i < userType .NumField (); i ++ {
19+ for i := range userType .NumField () {
2020 field := userType .Field (i )
2121 tag := field .Tag .Get ("sqlok" )
2222
You can’t perform that action at this time.
0 commit comments