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

added Do method for raw query by single conn from pool.Conn() #3182

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

Oleglacto
Copy link

No description provided.

@Oleglacto
Copy link
Author

Hello! I want to call Do method when I got Conn from redis.Pool. This PR can help me do this

@Oleglacto
Copy link
Author

@vmihailenco can u make review please?

@ndyakov
Copy link
Collaborator

ndyakov commented Feb 20, 2025

@Oleglacto can you please describe your usecase and add tests?

@Oleglacto
Copy link
Author

@ndyakov It is necessary to execute a raw query on a connection from the pool. Currently, this capability is not available, and workarounds such as Get, Set, etc., have to be used.

@ndyakov
Copy link
Collaborator

ndyakov commented Feb 21, 2025

@Oleglacto on top of my head i cannot think why this should not be possible. Any ideas? How will this behave if you are working with a connection that is in a pub/sub state?

p.s. Also the test that is added is failing cc @Oleglacto

@ndyakov ndyakov self-requested a review February 21, 2025 11:59
Comment on lines +22 to +26
It("should pong with Do cmd", func() {
result := client.Conn().Do(ctx, "PING")
Expect(result.Result()).To(Equal("PONG"))
Expect(result.Err()).NotTo(HaveOccurred())
})
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

test is failing

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

Successfully merging this pull request may close these issues.

2 participants