Simple support for `DUMP` and `RESTORE`
Closes #401
Simple implementation for DUMP and RESTORE which just supports string keys:
- Attempting to dump a different key type will produce
WRONGTYPE Operation against a key holding the wrong kind of value - For RESTORE I've implemented the
REPLACEandABSTTLoptional flags, but notIDLETIMEorFREQ(wasn't immediately obvious to me what these were :woman_shrugging: )
I have also:
- Renamed the existing
DumptoDebugDumpto avoid confusion - Extracted constants for the various key types
- Collected common validation into
validCMDand plugged it in for all the existing generic commands. Happy to do this for the remainder as well if the approach looks good to you :smile:
On Sat, May 17, 2025 at 03:53:02PM -0700, Alyssa wrote:
Closes #401
Simple implementation for
DUMPandRESTOREwhich just supports string keys:
Thanks! I'll have a look soon.
(not forgotten, just busy)
Looks good! I merged the first commit to master, since that was an easy one.
Renamed the existing Dump to DebugDump to avoid confusion
I don't think we can do that, it changes existing code.
thanks for your replies! I'll get back to you.
sorry for the delay. PR looks great and I'll merge it, but I do prefer to keep .Dump() named as is. I know it's an unlucky name, but I don't want to introduce a breaking change.
sorry for the delay. PR looks great and I'll merge it, but I do prefer to keep .Dump() named as is. I know it's an unlucky name, but I don't want to introduce a breaking change.
Ok! I've reverted that part of the change :+1:
Thanks! And sorry again for the slow reviewing.