Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a new method to unwraps the raw database connection #36

Closed
importcjj opened this issue Jul 8, 2020 · 1 comment
Closed

Add a new method to unwraps the raw database connection #36

importcjj opened this issue Jul 8, 2020 · 1 comment

Comments

@importcjj
Copy link
Owner

Can you add a take method for mobc::Connection? @importcjj
I can give up the current connection when I found the error is it.

The code is probably like follow

impl<M: Manager> Connection<M> {
    /// Take this Connection from the pool permanently.
    pub fn take(self) -> M {}
}

And this method can help convert the redis connection to PubSub connection: https://docs.rs/redis/0.16.0/redis/aio/struct.Connection.html#method.into_pubsub

Originally posted by @biluohc in #28 (comment)

@importcjj
Copy link
Owner Author

I think into_inner is better than take probably, I will add it as soon as possible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant