wasi-keyvalue icon indicating copy to clipboard operation
wasi-keyvalue copied to clipboard

Signature of KeyValue::Atomic::Increment

Open karthik2804 opened this issue 1 year ago • 1 comments

Currently, the signature of the atomic increment is

increment: func(bucket: bucket, key: key, delta: u64) -> result<u64, error>;

I would like to understand the reasoning behind the delta argument and the return u64 types. This would not support cases where atomic decrement is desired. Would it be better for the types to be i64 to allow for flexibility?

karthik2804 avatar Dec 07 '23 19:12 karthik2804