diff --git a/lib/documents.js b/lib/documents.js index 7b23db3f..19d86adc 100644 --- a/lib/documents.js +++ b/lib/documents.js @@ -2235,13 +2235,22 @@ Documents.prototype.suggest = function suggestDocuments() { }; /** - * The writeAll function writes documents to database using a passThrough stream. - * The concurrency is determined by the forestInfo retrieved. + * The writeAll function writes one or more documents to database using a passThrough stream and optional options. + * The optional options include onBatchSuccess, onBatchError, onCompletion, batchSize, concurrentRequests, + * defaultMetadata and transform. * @method documents#writeAll * @since 2.8.0 - * @param {string} options - Javascript literal object that configures the write operation. - * @returns {PassThrough stream} - a stream.Writable in object mode that receives document descriptor input from the - * application for writing to the database. + * @param {function(progress, documents)} [onBatchSuccess] - Notifies other systems about batches written successfully. + * @param {function(progress, documents, error)} [onBatchError] - Responds to any error while writing a batch of documents. + * @param {function(summary)} [onCompletion] - Provides a summary of the results. + * @param {Integer} [batchSize] - The number of documents in each batch. + * @param {object} [concurrentRequests] - JavaScript object literal that controls the maximum number of concurrent + * requests that can be pending at the same time. Valid keys are "multipleOf" and "multiplier". + * @param {object} [defaultMetadata] - the metadata values applied to each document including collections, + * permissions, properties, quality, and metadataValues. + * @param {string|mixed[]} [transform] - transformSpecification applied to each document. + * @returns {stream.Writable} - a stream.Writable in object mode that receives document descriptor input from the + * application for writing to the database. */ Documents.prototype.writeAll = function writeAllDocuments(options) { return writeAllDocumentsImpl.call(