use of com.mongodb.internal.operation.InsertOperation in project mongo-java-driver by mongodb.
the class CollectionHelper method insertDocuments.
public void insertDocuments(final List<BsonDocument> documents, final WriteConcern writeConcern, final WriteBinding binding) {
List<InsertRequest> insertRequests = new ArrayList<InsertRequest>(documents.size());
for (BsonDocument document : documents) {
insertRequests.add(new InsertRequest(document));
}
new InsertOperation(namespace, true, writeConcern, false, insertRequests).execute(binding);
}
Aggregations