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

Go: Implementing Copy command #2480

Closed
wants to merge 5 commits into from

Conversation

MikeMwita
Copy link
Collaborator

No description provided.

@MikeMwita MikeMwita requested a review from a team as a code owner October 20, 2024 15:10
@Yury-Fridlyand Yury-Fridlyand added the go golang wrapper label Oct 21, 2024
go/api/generic_commands.go Outdated Show resolved Hide resolved
go/api/generic_commands.go Outdated Show resolved Hide resolved
go/api/generic_commands.go Outdated Show resolved Hide resolved
go/api/generic_commands.go Outdated Show resolved Hide resolved
go/integTest/shared_commands_test.go Outdated Show resolved Hide resolved
@MikeMwita MikeMwita force-pushed the implement-copy-command branch 3 times, most recently from 42b3dd4 to 62ebad6 Compare October 27, 2024 12:33
Signed-off-by: MikeMwita <mwitamike8@gmail.com>
@@ -744,3 +744,22 @@ func (client *baseClient) Del(keys []string) (Result[int64], error) {

return handleLongResponse(result)
}

func (client *baseClient) Copy(sourceKey, destinationKey string, destinationDB *int, replace bool) (Result[bool], error) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Behavior of Copy is different for standalone and cluster mode. Can we please keep the definition of commands consistent with other clients? Reference

GenericBaseCommands:
Copy(source, destination)
Copy(source, destination, replace)

GenericCommands:
Copy(source, destination, destinationDB)
Copy(source, destination, destinationDB, replace)

@MikeMwita MikeMwita closed this Nov 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
go golang wrapper
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants