Skip to content

Commit bfef312

Browse files
committed
export db handler
1 parent 43089e0 commit bfef312

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

mysql/client.go

+5
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,11 @@ type Client struct {
7474
db *sqlx.DB
7575
}
7676

77+
// DB handler of the client
78+
func (cli *Client) DB() *sqlx.DB {
79+
return cli.db
80+
}
81+
7782
// Close the db behind the mysql client
7883
func (cli *Client) Close() error {
7984
if cli == nil || cli.db == nil {

0 commit comments

Comments
 (0)