insertOne
Inserts the provided document. If the document is missing an identifier, the driver should generate one.
Parameters
the document to insert
the options to apply to the operation
Throws
if the write failed due some other failure specific to the insert command
if the write failed due being unable to fulfil the write concern
if the write failed due to document validation reasons
if the write failed due some other failure
Inserts the provided document. If the document is missing an identifier, the driver should generate one.
Parameters
the client session with which to associate this operation
the document to insert
the options to apply to the operation
Throws
if the write failed due some other failure specific to the insert command
if the write failed due being unable to fulfil the write concern
if the write failed due to document validation reasons
if the write failed due some other failure