Skip to content

Add GETDEL command support#1123

Merged
yisraelU merged 1 commit into
profunktor:series/2.xfrom
dpevunov-cp:feature/get-del
May 14, 2026
Merged

Add GETDEL command support#1123
yisraelU merged 1 commit into
profunktor:series/2.xfrom
dpevunov-cp:feature/get-del

Conversation

@dpevunov-cp
Copy link
Copy Markdown
Contributor

Summary

  • Adds getDel to the Getter algebra and implements it in BaseRedis via Lettuce's getdel.
  • Adds an integration test in TestScenarios.stringsScenario covering missing key, existing key, and post-call deletion.

Example

for {
  _    <- redis.set("key", "value")
  v    <- redis.getDel("key")    // Some("value")
  gone <- redis.get("key")       // None
} yield ()

Test plan

  • sbt tests/Test/compile
  • sbt scalafmtCheckAll
  • Integration test stringsScenario passes against a live Redis

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
@dpevunov-cp
Copy link
Copy Markdown
Contributor Author

@arturaz
@mmienko

Could I get your review please?

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds support for the Redis GETDEL command by extending the Getter algebra with a getDel method, implementing it in BaseRedis using Lettuce's getdel, and adding an integration test that covers missing-key, existing-key, and post-call deletion semantics.

Changes:

  • Add getDel method to the Getter algebra trait.
  • Implement getDel in BaseRedis via Lettuce's getdel.
  • Extend stringsScenario integration test with assertions for getDel behavior.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
modules/effects/src/main/scala/dev/profunktor/redis4cats/algebra/strings.scala Adds getDel to the Getter algebra.
modules/effects/src/main/scala/dev/profunktor/redis4cats/redis.scala Implements getDel in BaseRedis using Lettuce's getdel.
modules/tests/src/test/scala/dev/profunktor/redis4cats/TestScenarios.scala Adds integration test coverage for missing key, existing key, and post-delete state.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@yisraelU
Copy link
Copy Markdown
Collaborator

looks good. ty

@yisraelU yisraelU merged commit 03abf76 into profunktor:series/2.x May 14, 2026
7 checks passed
@dpevunov-cp
Copy link
Copy Markdown
Contributor Author

looks good. ty

Thank you for merging and approval!
What are the next steps to have it published in new library version? I want to be able to use it in my repo.

@yisraelU
Copy link
Copy Markdown
Collaborator

@dpevunov-cp we publish snapshots upon merge

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.

3 participants