Details
-
Improvement
-
Resolution: Fixed
-
Unknown
-
None
-
None
-
None
-
Not Needed
-
Description
func IsDuplicateKeyError(err error) bool
|
IsDuplicateKeyError returns true if err is a duplicate key error
|
This doesn't answer the question of what happens in the case of "hybrid" WriteException errors (e.g., a dupe-key plus some other WriteError).
It would be good for this function to clarify. (Based on the present implementation, as long as there is >=1 dupe-key error, the function returns true.)
Aside: In driver v2 "HasDuplicateKeyEerror" might be a better name?