You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Our abstration right now adds an additional layer of indentation in most cases which isn't really needed. The only instance we would need these closures is if you want to pipeline your queries (since you need them to share the same connection to actually pipeline).
For most other cases it would actually be more ergonomic to allow the pool to be used just like a connection. That way we only borrow a connection as long as we need to and avoid the level of indentation.
The text was updated successfully, but these errors were encountered:
Rename .with_connection to .pipeline to change the semantics by naming
Implement the required diesel-async traits for the pool which internally just borrow a connection and execute it on the connection (traits being AsyncConnection, SimpleAsyncConnection, and UpdateAndFetchResults)
This would allow pipelining the same way as before:
One of the tradeoffs here is one more layer of boxing futures. Since diesel-async uses async-trait for various traits, we would have to box again meaning we poll a boxed future inside a boxed future, missing some inline opportunities.
Won't break the world and we will still be faster by multiple magnitudes than other implementations, just something to keep in mind for now.
Our abstration right now adds an additional layer of indentation in most cases which isn't really needed. The only instance we would need these closures is if you want to pipeline your queries (since you need them to share the same connection to actually pipeline).
For most other cases it would actually be more ergonomic to allow the pool to be used just like a connection. That way we only borrow a connection as long as we need to and avoid the level of indentation.
The text was updated successfully, but these errors were encountered: