From 4bcdd24cad431092ebab8be8e71cb28dd5f42c2b Mon Sep 17 00:00:00 2001 From: Gady Date: Fri, 28 Jul 2017 18:03:05 +0100 Subject: [PATCH] Mongodb insert many (#18473) * Improve types for Collection.insertMany * Add contribution * Remove blank line --- types/mongodb/index.d.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/types/mongodb/index.d.ts b/types/mongodb/index.d.ts index 311e696c8a..9d667a8983 100644 --- a/types/mongodb/index.d.ts +++ b/types/mongodb/index.d.ts @@ -2,6 +2,7 @@ // Project: https://github.com/mongodb/node-mongodb-native/tree/2.2 // Definitions by: Federico Caselli // Alan Marcell +// Gady Piazza // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.3 @@ -672,7 +673,7 @@ export interface CollectionAggregationOptions { bypassDocumentValidation?: boolean; } -//http://mongodb.github.io/node-mongodb-native/2.1/api/Collection.html#insertMany +//http://mongodb.github.io/node-mongodb-native/2.2/api/Collection.html#insertMany export interface CollectionInsertManyOptions { // The write concern. w?: number | string; @@ -684,6 +685,10 @@ export interface CollectionInsertManyOptions { serializeFunctions?: boolean; //Force server to assign _id values instead of driver. forceServerObjectId?: boolean; + // Allow driver to bypass schema validation in MongoDB 3.2 or higher. + bypassDocumentValidation?: boolean; + // If true, when an insert fails, don't execute the remaining writes. If false, continue with remaining inserts when one fails. + ordered?: boolean; } //http://mongodb.github.io/node-mongodb-native/2.1/api/Collection.html#bulkWrite