-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
121 additions
and
79 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
package testmodel | ||
|
||
type MultiplePrimaryKey struct { | ||
Pk1 string `exql:"column:pk1;primary"` | ||
Pk2 string `exql:"column:pk2;primary"` | ||
Other int `exql:"column:other"` | ||
} | ||
|
||
func (*MultiplePrimaryKey) TableName() string { | ||
return "dummy" | ||
} | ||
|
||
type NoTag struct { | ||
} | ||
|
||
func (*NoTag) TableName() string { | ||
return "dummy" | ||
} | ||
|
||
type BadTableName struct { | ||
Id int `exql:"column:id;primary;auto_increment"` | ||
} | ||
|
||
func (BadTableName) TableName() string { | ||
return "" | ||
} | ||
|
||
type NoPrimaryKey struct { | ||
Id int `exql:"column:id;auto_increment"` | ||
} | ||
|
||
func (NoPrimaryKey) TableName() string { | ||
return "" | ||
} | ||
|
||
type NoColumnTag struct { | ||
Id int `exql:"primary;auto_increment"` | ||
} | ||
|
||
func (NoColumnTag) TableName() string { | ||
return "" | ||
} | ||
|
||
type BadTag struct { | ||
Id int `exql:"a;a:1"` | ||
} | ||
|
||
func (BadTag) TableName() string { | ||
return "" | ||
} | ||
|
||
type NoAutoIncrementKey struct { | ||
Id int `exql:"column:id;primary"` | ||
Name string `exql:"column:name"` | ||
} | ||
|
||
func (s *NoAutoIncrementKey) TableName() string { | ||
return "sampleNoAutoIncrementKey" | ||
} | ||
|
||
type PrimaryUint64 struct { | ||
Id uint64 `exql:"column:id;primary;auto_increment"` | ||
Name string `exql:"column:name"` | ||
} | ||
|
||
func (s *PrimaryUint64) TableName() string { | ||
return "samplePrimaryUint64" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters