feat(mysql): thread E: Execute through the executor

+ handle normal errors separate from unexpected errors, an unexpected
   error causes the connection to close (in which case, if this was
   behind a pool, the pool would not allow this connection to be
   acquired again)
This commit is contained in:
Ryan Leckey
2021-02-18 23:35:36 -08:00
parent 60cf88c38f
commit 7db850da71
15 changed files with 450 additions and 271 deletions

View File

@@ -30,6 +30,8 @@ pub enum Error {
///
RowNotFound,
Closed,
Decode(DecodeError),
Encode(EncodeError),
@@ -82,6 +84,8 @@ impl Display for Error {
f.write_str("no row returned by a query required to return at least one row")
}
Self::Closed => f.write_str("connection or pool was closed"),
Self::Decode(error) => {
write!(f, "{}", error)
}