You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
returntrue, fmt.Errorf("dynamo: ConditionalCheckFailedException does not contain item (is IncludeItemInCondCheckFail disabled?): %w", condCheckErr)
217
+
}
218
+
returntrue, UnmarshalItem(cfe.Item, out)
219
+
}
220
+
returnfalse, condCheckErr
221
+
}
207
222
208
-
// func (noopLogger) Log(...interface{}) {}
223
+
// Unmarshals items from a TransactionCanceledException by appending them to `out`, which must be a pointer to a slice.
224
+
// The return value boolean `match` will be true if txCancelErr is a TransactionCanceledException with at least one ConditionalCheckFailed cancellation reason,
225
+
// otherwise false if it is nil or a different error.
// If successful, the return value `deleted` will be true, and nothing will be unmarshaled to `out`
105
+
//
106
+
// If the delete is unsuccessful because of a condition check failure, `deleted` will be false, the current value of the item will be unmarshaled to `out`, and `err` will be nil.
107
+
//
108
+
// If the delete is unsuccessful for any other reason, `deleted` will be false and `err` will be non-nil.
ifok, err:=UnmarshalItemFromCondCheckFailed(err, out); ok {
117
+
returnfalse, err
118
+
}
119
+
returnfalse, err
120
+
}
121
+
returntrue, nil
122
+
}
123
+
124
+
// IncludeAllItemsInCondCheckFail specifies whether an item delete that fails its condition check should include the item itself in the error.
125
+
// Such items can be extracted using [UnmarshalItemFromCondCheckFailed] for single deletes, or [UnmarshalItemsFromTxCondCheckFailed] for write transactions.
0 commit comments