MONGO LINK SYMBOL
To use MongoCollectionInsert, you first need to load using MongoLink . Needs ["MongoLink`" ]
MongoCollectionInsert returns a object. MongoInsertResult
Each document is an doc n that must be convertible to the Association format. Documents that cannot be converted to the BSON format will cause an insertion failure. "BSON"
The following options are supported:
"Ordered" True whether to insert documents in the given order.
"WriteConcern" Automatic the write concern to use.
"WriteConcern" can either be , or a Automatic object. MongoWriteConcern
If "Ordered" is , documents will be inserted on the server serially, in the order provided. If an error occurs all remaining inserts are aborted. If True , documents will be inserted on the server in arbitrary order, possibly in parallel, and all document inserts will be attempted. False
corresponds to MongoCollectionInsert db.collection.insertMany.
MongoDB puts a size restriction of 16 megabytes on BSON documents to insert.
Connect to a client:
Connect to a the "WolframTestCollection" collection in the "WolframTestDB" database:
Create an data association to represent a document:
Insert one document into the collection:
Obtain a list of the primary keys of the inserted documents:
Create an data association to represent a series of documents:
Insert many documents into the collection: