Skip to content

Commit ba81289

Browse files
committed
Bump REL v0.24.0
1 parent a30e9d0 commit ba81289

File tree

3 files changed

+9
-8
lines changed

3 files changed

+9
-8
lines changed

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ module github.com/go-rel/mysql
33
go 1.17
44

55
require (
6-
github.com/go-rel/rel v0.23.0
6+
github.com/go-rel/rel v0.24.0
77
github.com/go-rel/sql v0.0.0-20210924071334-d5c44e7ac27a
88
github.com/go-sql-driver/mysql v1.6.0
99
github.com/stretchr/testify v1.7.0

go.sum

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ github.com/fsnotify/fsnotify v1.4.9 h1:hsms1Qyu0jgnwNXIxa+/V/PDsU6CfLf6CNO8H7IWo
66
github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ=
77
github.com/go-rel/rel v0.23.0 h1:xVte6QJhCLGQoTeHeUbIWTVDwllFCVzmJ8511XEnbtg=
88
github.com/go-rel/rel v0.23.0/go.mod h1:/VBLj1U4ZVb53aB3n22RQwX0V9DvckohseDJQibn2Rs=
9+
github.com/go-rel/rel v0.24.0 h1:DXx8DjUwkkg9EcLfS/m5YGGjdV4fjs7dsrcDVS1Zk0w=
10+
github.com/go-rel/rel v0.24.0/go.mod h1:/VBLj1U4ZVb53aB3n22RQwX0V9DvckohseDJQibn2Rs=
911
github.com/go-rel/sql v0.0.0-20210924055504-659da3ef441e h1:poChcPKFZD5NP6dSRVQ2vA6Y9LN8q6rWgc0T+pAFkwo=
1012
github.com/go-rel/sql v0.0.0-20210924055504-659da3ef441e/go.mod h1:vnvQ9jFzTgFvOl5qcntoFXrs9sas39YcIJG30LFlc50=
1113
github.com/go-rel/sql v0.0.0-20210924071334-d5c44e7ac27a h1:XHhefCPNAkIAlWBTLnIhP558wG5GN8G72txM+i7P3pQ=

mysql_test.go

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ import (
88

99
"github.com/go-rel/rel"
1010
"github.com/go-rel/rel/adapter/specs"
11-
"github.com/go-rel/sql"
1211
_ "github.com/go-sql-driver/mysql"
1312
"github.com/stretchr/testify/assert"
1413
)
@@ -26,7 +25,7 @@ func dsn() string {
2625
func TestAdapter_specs(t *testing.T) {
2726
adapter, err := Open(dsn())
2827
assert.Nil(t, err)
29-
defer adapter.(*sql.SQL).Close()
28+
defer adapter.Close()
3029

3130
repo := rel.New(adapter)
3231

@@ -101,36 +100,36 @@ func TestAdapter_Open(t *testing.T) {
101100
// with parameter
102101
assert.NotPanics(t, func() {
103102
adapter, _ := Open("root@tcp(localhost:3306)/rel_test?charset=utf8")
104-
defer adapter.(*sql.SQL).Close()
103+
defer adapter.Close()
105104
})
106105

107106
// without paremeter
108107
assert.NotPanics(t, func() {
109108
adapter, _ := Open("root@tcp(localhost:3306)/rel_test")
110-
defer adapter.(*sql.SQL).Close()
109+
defer adapter.Close()
111110
})
112111
}
113112

114113
func TestAdapter_Transaction_commitError(t *testing.T) {
115114
adapter, err := Open(dsn())
116115
assert.Nil(t, err)
117-
defer adapter.(*sql.SQL).Close()
116+
defer adapter.Close()
118117

119118
assert.NotNil(t, adapter.Commit(ctx))
120119
}
121120

122121
func TestAdapter_Transaction_rollbackError(t *testing.T) {
123122
adapter, err := Open(dsn())
124123
assert.Nil(t, err)
125-
defer adapter.(*sql.SQL).Close()
124+
defer adapter.Close()
126125

127126
assert.NotNil(t, adapter.Rollback(ctx))
128127
}
129128

130129
func TestAdapter_Exec_error(t *testing.T) {
131130
adapter, err := Open(dsn())
132131
assert.Nil(t, err)
133-
defer adapter.(*sql.SQL).Close()
132+
defer adapter.Close()
134133

135134
_, _, err = adapter.Exec(ctx, "error", nil)
136135
assert.NotNil(t, err)

0 commit comments

Comments
 (0)