Releases: scofieldpeng/mysql-go
Releases · scofieldpeng/mysql-go
upgrade xorm version to v0.8.1
Merge pull request #6 from scofieldpeng/dev upgrade xorm version to latest
fix go.sum bug
v3.0.3 update
adapt to go version 1.13
v3.0.0 update go.mod
v2.0.3-beta.2 released
add table.TableNode() default value
v2.0.3-beta.1: Merge pull request #5 from scofieldpeng/dev
add table.SetTableNode
v2.0.3 released
add table helper, table struct don't need to write duplicate get,find,update etc method
usage:
type TestTable struct{
// implements mysql.TableFactory and set the xorm tag to -
mysql.TableFactory `xorm:"-" json:"-"`
Id int `xorm:"not null pk autoincr INT(11)"`
Value string `xorm:"not null VARCHAR(20)"`
}
// this is must needed
type(tt *TestTable) self() *TestTable {
return tt
}
// You must need to use this method to create a struct, do not use create a instance by &TestTable{} direct!!!!
func NewTestTable() * TestTable {
tt := &TestTable{}
// this step is needed!!!!
tt.myself=tt.self
return tt
}
// usage, more example see table_test.go pls
tt := NewTestTable()
tt.Id = 1
if _,err := tt.Get();err != nil {
fmt.Println(err.Error())
}
support go modules
v2.0.2 add go module support
fix mysql pool timeout
修复mysql连接被关闭的bug
update to 2.0.0
Merge pull request #2 from scofieldpeng/dev add varible ErrAffectedZeroRow