// ConditionalPut sets the value for a specified key only if // the expected value matches. If not, the return value contains // the actual value. func (r *Range) ConditionalPut(batch engine.Engine, ms *engine.MVCCStats, args *proto.ConditionalPutRequest, reply *proto.ConditionalPutResponse) { err := engine.MVCCConditionalPut(batch, ms, args.Key, args.Timestamp, args.Value, args.ExpValue, args.Txn) reply.SetGoError(err) }
// ConditionalPut sets the value for a specified key only if // the expected value matches. If not, the return value contains // the actual value. func (r *Range) ConditionalPut(batch engine.Engine, ms *engine.MVCCStats, args proto.ConditionalPutRequest) (proto.ConditionalPutResponse, error) { var reply proto.ConditionalPutResponse return reply, engine.MVCCConditionalPut(batch, ms, args.Key, args.Timestamp, args.Value, args.ExpValue, args.Txn) }