@@ -49,20 +49,22 @@ type CollectionDocumentCreate interface {
49
49
50
50
// CreateDocuments creates multiple documents in the collection.
51
51
// The document data is loaded from the given documents slice, the documents metadata is returned.
52
- // If a documents element already contains a `_key` field, this will be used as key of the new document,
52
+ // If a document element already contains a `_key` field, this will be used as key of the new document,
53
53
// otherwise a unique key is created.
54
- // If a documents element contains a `_key` field with a duplicate key, other any other field violates an index constraint,
55
- // a ConflictError is returned in its indeed in the errors slice.
54
+ // If a document element contains a `_key` field with a duplicate key, or any other field that violates an index constraint,
55
+ // then the ConflictError for a specific document will be returned only while reading from CollectionDocumentCreateResponseReader
56
+ // and not as the error output of this function.
56
57
// If the create request itself fails or one of the arguments is invalid, an error is returned.
57
58
// SmartGraphs and EnterpriseGraphs cannot use existing collections and cannot use the document interface
58
59
CreateDocuments (ctx context.Context , documents interface {}) (CollectionDocumentCreateResponseReader , error )
59
60
60
61
// CreateDocumentsWithOptions creates multiple documents in the collection.
61
62
// The document data is loaded from the given documents slice, the documents metadata is returned.
62
- // If a documents element already contains a `_key` field, this will be used as key of the new document,
63
+ // If a document element already contains a `_key` field, this will be used as key of the new document,
63
64
// otherwise a unique key is created.
64
- // If a documents element contains a `_key` field with a duplicate key, other any other field violates an index constraint,
65
- // a ConflictError is returned in its indeed in the errors slice.
65
+ // If a document element contains a `_key` field with a duplicate key, or any other field that violates an index constraint,
66
+ // then the ConflictError for a specific document will be returned only while reading from CollectionDocumentCreateResponseReader
67
+ // and not as the error output of this function.
66
68
// If the create request itself fails or one of the arguments is invalid, an error is returned.
67
69
// SmartGraphs and EnterpriseGraphs cannot use existing collections and cannot use the document interface
68
70
CreateDocumentsWithOptions (ctx context.Context , documents interface {}, opts * CollectionDocumentCreateOptions ) (CollectionDocumentCreateResponseReader , error )
0 commit comments