MSETNX sets the given keys and values atomically in a transaction, but only if none of the given keys exist. If one or more of the keys already exist, nothing will be changed and MSETNX will return false. Works similar to https://redis.io/commands/msetnx
(data map[string]Value)
| 157 | // |
| 158 | // Works similar to https://redis.io/commands/msetnx |
| 159 | func (c Client) MSETNX(data map[string]Value) (ok bool, err error) { |
| 160 | return c.mset(data, Flags{IfNotExists}) |
| 161 | } |
| 162 | |
| 163 | func (c Client) mset(data map[string]Value, flags Flags) (ok bool, err error) { |
| 164 | inputs := make([]dynamodb.TransactWriteItem, 0, len(data)) |