blackbeam / rust-mysql-simple

Mysql client library implemented in rust.
Apache License 2.0
666 stars 145 forks source link

feat!: ping and select_db return Result #355

Closed robjtede closed 8 months ago

robjtede commented 1 year ago

Motivation

It would be nicer to use .ping() in r2d2_mysql's health checks for connections. As it is, we have to either run a query or use .ping() and lose source information.

Notes

It is easy for downstream users to call .is_ok() on the Result to get the bool back. It is not possible, however, to go the other way without losing information.

This is a breaking API change.