Mysql: Implement database/sql/driver.Validator interface

Created on 21 May 2020  ·  7Comments  ·  Source: go-sql-driver/mysql

Issue description

Go 1.15 will introduce a new Validator interface, which may be implemented by Conn to allow drivers to signal if a connection is valid or if it should be discarded:

https://tip.golang.org/pkg/database/sql/driver/#Validator

Go1.15 good first issue

All 7 comments

If anyone haven't started on this, I would like to have a look

Go ahead. I assigned you :)

@dilantha111 Hi, have you started on this?
Go 1.15 is already released, so I'm looking forward this.

Hi @shogo82148 sorry that I was very too late to respond. But now my focus has been shifted, and no longer in go development. I think it's better someone else look into this. Thanks.

@julienschmidt If you don't mind, I would like to send a PR for this issue.
My idea is to use mysqlConn#error() method to check if there is any errors atm, then return bool value respectively.

@trongbq Sounds good. I assigned you 😄

Was this page helpful?
0 / 5 - 0 ratings

Related issues

pmoosman picture pmoosman  ·  9Comments

tanepiper picture tanepiper  ·  8Comments

Dieterbe picture Dieterbe  ·  6Comments

BSick7 picture BSick7  ·  8Comments

tbdingqi picture tbdingqi  ·  7Comments