Open sarthakaggarwal97 opened 3 days ago
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 70.76%. Comparing base (
4986310
) to head (3dc3407
).
🚨 Try these New Features:
@sarthakaggarwal97 Please avoid force pushing. force push removes the reviewer's history in Github and one needs to look at the entire change again.
noted @hpatro, will avoid it.
This PR allows the Valkey users to perform conditional updates where the SET command is completed if the given comparison-value matches the key’s current value.
Behavior with this PR
If the values match, the SET completes as expected. If they do not match, the command returns a (nil).
Behavior with Additional Flags
SET <key> <value> IFEQ <comparison-value> GET
returns the existing value if present, (nil) if not and gives the error if there is a Type Mismatch. Conditional set operation is performed if the given comparison value matches the existing value.SET <key> <value> IFEQ <comparison-value> XX
returns nil if the key doesn't exist, otherwise conditionally updates the key if the given comparison value matches the existing value.SET <key> <value> IFEQ <comparison-value> NX
returns nil whether or not the key exists. Does not conditionally update the key ifNX
flag is presentAddresses: #1215