Closed Fishrock123 closed 3 years ago
This changes a lot of this crate to be generic over sqlx::Database, and also changes the naming of everything to be "SQLx*".
sqlx::Database
Additionally, this now has a greatly simplified ConnectionWrapInner implementation via Deref and DerefMut! Thanks to @mehcode for that!
ConnectionWrapInner
Deref
DerefMut
Future improvements, either in this PR or in follow-ups include:
tide_sqlx::PostgresMiddleware
tide_sqlx::SQLxMiddleware<Postgres>
tide_sqlx::PostgresRequestExt
req.postgres_conn()
req.sqlx_conn::<Postgres>()
note to self: still need to remove the "postgres" and "any" features by default, only include in test runs
"postgres"
"any"
This changes a lot of this crate to be generic over
sqlx::Database
, and also changes the naming of everything to be "SQLx*".Additionally, this now has a greatly simplified
ConnectionWrapInner
implementation viaDeref
andDerefMut
! Thanks to @mehcode for that!Future improvements, either in this PR or in follow-ups include:
tide_sqlx::PostgresMiddleware
(and etc) as aliases to e.g.tide_sqlx::SQLxMiddleware<Postgres>
when the postgres feature is enabled.tide_sqlx::PostgresRequestExt
(and etc) as shortcusts to allowreq.postgres_conn()
rather thanreq.sqlx_conn::<Postgres>()
.note to self: still need to remove the
"postgres"
and"any"
features by default, only include in test runs