Mongodb insert many (#18473)

* Improve types for Collection.insertMany

* Add contribution

* Remove blank line
This commit is contained in:
Gady
2017-07-28 10:03:05 -07:00
committed by Andy
parent c051125bb9
commit 4bcdd24cad
+6 -1
View File
@@ -2,6 +2,7 @@
// Project: https://github.com/mongodb/node-mongodb-native/tree/2.2
// Definitions by: Federico Caselli <https://github.com/CaselIT>
// Alan Marcell <https://github.com/alanmarcell>
// Gady Piazza <https://github.com/kikar>
// 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