added RENAME Command
Added support for Rename Command #253
@rkarthick15 please add the atomic rename API to the store and use it for evaluation the RENAME operation
@JyotinderSingh
I am trying to create a new store API for rename, below is the sample snippet
func Rename(sourceKey string, destinationKey string, obj *Obj) bool {
storeMutex.Lock()
defer storeMutex.Unlock()
keypoolMutex.Lock()
defer keypoolMutex.Unlock()
//Delete the destinationKey if exists
//create a new destinationKey and set the value
//Delete the source Key
return false
}
If this above method is correct, can we have a separate shared functions for Put and Delete operations?, so that rename, put , del function can also access the same shared function for PUT and DEL operations
@JyotinderSingh
I am trying to create a new store API for rename, below is the sample snippet
func Rename(sourceKey string, destinationKey string, obj *Obj) bool { storeMutex.Lock() defer storeMutex.Unlock() keypoolMutex.Lock() defer keypoolMutex.Unlock() //Delete the destinationKey if exists //create a new destinationKey and set the value //Delete the source Key return false }If this above method is correct, can we have a separate shared functions for Put and Delete operations?, so that rename, put , del function can also access the same shared function for PUT and DEL operations
Sounds good, just make sure those functions aren't exported from the package.
There are a few merge conflicts as well, please resolve them @rkarthick15