Skip to content

Releases: scofieldpeng/mysql-go

upgrade xorm version to v0.8.1

09 Feb 04:26
428a524
Compare
Choose a tag to compare
Merge pull request #6 from scofieldpeng/dev

upgrade xorm version to latest

fix go.sum bug

22 Oct 15:13
Compare
Choose a tag to compare
v3.0.3

update

adapt to go version 1.13

16 Oct 16:55
Compare
Choose a tag to compare
v3.0.0

update go.mod

v2.0.3-beta.2 released

25 Nov 09:47
Compare
Choose a tag to compare

add table.TableNode() default value

v2.0.3-beta.1: Merge pull request #5 from scofieldpeng/dev

25 Nov 09:45
6f82abb
Compare
Choose a tag to compare
add table.SetTableNode

v2.0.3 released

25 Nov 08:18
fa960dc
Compare
Choose a tag to compare
v2.0.3 released Pre-release
Pre-release

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

04 Sep 14:34
Compare
Choose a tag to compare
v2.0.2

add go module support

fix mysql pool timeout

25 Jul 16:35
Compare
Choose a tag to compare
Pre-release

修复mysql连接被关闭的bug

update to 2.0.0

13 May 03:04
8dd8304
Compare
Choose a tag to compare
update to 2.0.0 Pre-release
Pre-release
Merge pull request #2 from scofieldpeng/dev

add varible ErrAffectedZeroRow